Thank Mr DuBois,
I am sorry I made mistake when I stated my problem and confused some people.
Actually it is not comma separated field, but field separated by '|' like
this
2101|13 Ghosts|01:28||Olivier Ducastel,Jacques Martineau||
But when I loaded field data 'Olivier Ducastel,Jacques Martineau' the comma
',' is replaced
with '\,'.
So if I select that field it gives 'Olivier Ducastel\,Jacques Martineau'.
How to make load data leave comma in the character as it is? Or probably I
missing some option?
Jamal
----- Original Message -----
From: "Paul DuBois" <[EMAIL PROTECTED]>
To: "jamal" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, May 30, 2001 12:09 PM
Subject: Re: What option of LOAD DATA should I use?
> At 4:44 PM +0900 5/28/01, jamal wrote:
> >Hi all,
> >
> >How to use MySQL LOAD DATA command to load comma separated text data
>
> Huh? Your LOAD DATA statement below specifies |-separated data,
> not comma-separated data.
>
> >but one of the field can contains comma character as part of of the
> >string context.?
> >In other word, I want LOAD DATA insert string with comma characters
> >inside it but without
> >adding slash character ('\')to distinguish it as a field separator.
>
> I may be missing something, but that doesn't appear to make sense.
> If a comma is a field separator, then somehow you need to specify that
> within-field commas are not separators, either by escaping them, or by
> quoting the fields. Without using one of those mechanisms, MySQL has no
> way to distinquish separator and non-separator commas.
>
> >
> >I use this command,
> >
> >LOAD DATA LOCAL INFILE "DATA.TXT" REPLACE INTO TABLE tbl
> > FIELDS TERMINATED BY "|" IGNORE 1 LINES
> >
> >but when I look at the table tbl, everything is fine except
> >in the field that contain comma character, comma charater is written
> >as '\,' rather than just ','.
> >
> >What option of LOAD DATA should I use?
> >
> >Jamal
>
>
> --
> Paul DuBois, [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php