Remove line breaks from rows with SQL


UPDATE Person
SET 
Firstname = REPLACE(REPLACE(Firstname, CHAR(10), '') , CHAR(13), ''),
Lastname = REPLACE(REPLACE(Lastname, CHAR(10), '') , CHAR(13), ''),
[Address] = REPLACE(REPLACE([Address], CHAR(10), '') , CHAR(13), ''),
City = REPLACE(REPLACE(City, CHAR(10), '') , CHAR(13), '')

where filterOnThis = '8EBE0C5D-4ADC-4DCB-8E59-CF464A94F979'

Remove CHAR(10) and CHAR(13).

0 0 votes
Article rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments