When importing data I need to remove a set of characters from a string to allow comparison with a column. The database is 9.0.2, so regular expressions are not available (at least to my knowledge).
String is 'A.628.164-09/11'
My first approach was to loop over all characters of the original string, using CHARINDEX to determine if it is to be skipped.
But I wonder, if there's a better solution. Any ideas?
What about the replace() function ? If you have only a small number of characters to remove you can use a few hard coded calls which should be faster as a loop.
answered 25 Oct '10, 15:36