Unix Technical Forum

carriage return - Chr(13) & Chr(10)

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 ...


Go Back   Unix Technical Forum > Database Server Software > MySQL

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 11:30 AM
JackpipE
 
Posts: n/a
Default carriage return - Chr(13) & Chr(10)

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 11:30 AM
Captain Paralytic
 
Posts: n/a
Default Re: carriage return - Chr(13) & Chr(10)

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-28-2008, 11:30 AM
JackpipE
 
Posts: n/a
Default Re: carriage return - Chr(13) & Chr(10)


> 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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-28-2008, 11:30 AM
Luuk
 
Posts: n/a
Default Re: carriage return - Chr(13) & Chr(10)


"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] ??



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-28-2008, 11:30 AM
SigPower@gmail.com
 
Posts: n/a
Default Re: carriage return - Chr(13) & Chr(10)

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),'');
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:45 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com