Lee, UPADTE table SET description = REPLACE(description, '\r\n', '');
should work... REPLACE(str,from_str,to_str) Returns the string str with all occurrences of the string from_str replaced by the string to_str. mysql> SELECT REPLACE('www.mysql.com', 'w', 'Ww'); -> 'WwWwWw.mysql.com' This function is multi-byte safe. http://dev.mysql.com/doc/mysql/en/String_functions.html cheers Lachlan -----Original Message----- From: leegold [mailto:[EMAIL PROTECTED] Sent: Friday, 9 July 2004 2:11 PM To: [EMAIL PROTECTED] Subject: Re: editing all columns in a table On Thu, 08 Jul 2004 21:12:01 -0400, "leegold" <[EMAIL PROTECTED]> said: > I have a situation were a table field item has a > situation like: \r\ndata\r\n. So an item's got > line breaks in there with it in the field and > it's screwing things up for me. How do I do a global > clean-up of this and remove all \r and \n for > all of that col. in my table? If it was flat-file > I'd run a Perl regex, I just did a mysqldump to a file and looked at it with a text editor and I see the '\r\n' surrounding my items. Maybe this could be a file I can unleash a regex on. It's a very simple regex. Then I load the load file into the "new" DB as planned - I wonder if I would break anything? Actually now I'm thinking there are "backdoors"/tricks to editing this type of thing (w/appropiate backups). >but how w/data in MYSQL tables? > Thanks for helping with this novice/easy stuff - OK > if you can just link me to the info. Lee G. > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]