Monday, February 2, 2009

removing carriage return/new line character in mysql

on importing a csv to mysql I saw these little black square characters, which were carriage return symbols of course. To remove these little artifacts run the following query:

update [table_name] set [field_name] = replace([field_name],'\r','');

No comments: