Gossamer Forum
Home : General : Databases and SQL :

update query that strips linefeeds

Quote Reply
update query that strips linefeeds
Can anyone tell me how to use an SQL query to update every row of a table, stripping all linefeeds (both \n and \r) from the values in a particular column? I'm sure this is doable, I just can't quite figure it out. Many thanks for your help.

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund
Quote Reply
Re: [hennagaijin] update query that strips linefeeds In reply to
UPDATE table SET column = REPLACE(column, "\n", "");
UPDATE table SET column = REPLACE(column, "\r", "");

Cheers,

Alex
--
Gossamer Threads Inc.

Last edited by:

Alex: Mar 24, 2003, 2:42 PM
Quote Reply
Re: [Alex] update query that strips linefeeds In reply to
Thank, Alex - that did the job!

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund