I'm honestly not sure SQL Server is the correct answer to doing this. This is going to take A LOT more than a SUBSTRING. Especially if that error is stored in a single column.
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk