Zack Sessions (firstname.lastname@example.org) writes:
I have a table that has a Text datatype column that has gotten some
characters in it somehow, probably from key entry. I need to remove
the garbage, multiple occurances of char(15). The replace function
does not work on Text datatype. Any suggestions?
One way would be to iterate over the table, and for each row get slices
of 8000 chars to a varchar value on which you run replace(). You would
then use updatetext to update the row. A bit tricky, because if first
got chars 1 to 8000, and removed 6 char(15), you should now start on
char 7994 for the next batch.
Not particularly funny, I know.
Erland Sommarskog, SQL Server MVP, email@example.com
Books Online for SQL Server SP3 at http://www.microsoft.com/sql/techinf...2000/books.asp