This is a discussion on carriage return - Chr(13) & Chr(10) within the MySQL forums, part of the Database Server Software category; --> I imported data from MS Access into mysql and each record has carriage return. In Access it's represented as ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I imported data from MS Access into mysql and each record has carriage return. In Access it's represented as Chr(13) & Chr(10). Does anyone know how is it represented in Mysql? I need to run replace query and get rid of them. JP |
| |||
| On 14 Dec, 03:38, JackpipE <pipe.j...@gmail.com> wrote: > I imported data from MS Access into mysql and each record has carriage > return. In Access it's represented as Chr(13) & Chr(10). Does anyone > know how is it represented in Mysql? I need to run replace query and > get rid of them. > > JP Data is data. If you loaded Chr(13) & Chr(10) into the field then that is what will be in there. |
| |||
| > Data is data. If you loaded Chr(13) & Chr(10) into the field then > that is what will be in there. executing query such as: update [table_name] set [field_name] = replace([field_name],'ch(13) & ch(10)','|'); doesn't do anything. I try 'ch(13) + ch(10)' and nothing seems to be working. The query executes but nothing is being replaced. |
| |||
| "JackpipE" <pipe.jack@gmail.com> schreef in bericht news:5a69d697-3718-4d22-b92f-8df52b533fb2@i12g2000prf.googlegroups.com... > >> Data is data. If you loaded Chr(13) & Chr(10) into the field then >> that is what will be in there. > > > executing query such as: > update [table_name] set [field_name] = replace([field_name],'ch(13) & > ch(10)','|'); > doesn't do anything. I try 'ch(13) + ch(10)' and nothing seems to be > working. The query executes but nothing is being replaced. then probably there is NO value 'ch(13) & ch(10)' in any of the fields [field_name] ?? |
| ||||
| On Dec 14, 10:36 am, JackpipE <pipe.j...@gmail.com> wrote: > > Data is data. If you loaded Chr(13) & Chr(10) into the field then > > that is what will be in there. > > executing query such as: > update [table_name] set [field_name] = replace([field_name],'ch(13) & > ch(10)','|'); > doesn't do anything. I try 'ch(13) + ch(10)' and nothing seems to be > working. The query executes but nothing is being replaced. I would try running the query twice, once for char(13) and then again for char(10). Something like: update table set field = replace(field,char(13),'|'); update table set field = replace(field,char(10),''); |