MS SQL how to replace line feed or carriage return with space

SQL 2000, SQL 2005 and SQL 2008

You can replace carriage return and line feed in a field by running the following query:

update tbl1 set field1 = replace(field1,0x0a,' ')

And
update tbl1 set field1 = replace(field1,0x0D,' ')

[ad#co-1]

Comments are closed.