Chris Book writes:

> load data local infile 'file.txt' into table mytable fields optionally
> enclosed by '"' escaped by '"' terminated by ','

I'm not sure how mysql handles the case where the escape
character is the same as the field enclosing character, and
I can see a problem here if you have a field that contains
a " as its first character. Do you really have to have your
double quotes in the input field escaped as ""? The example
you provided had no strings with quotes in them, so what
about just using the standard escape character (backslash)?

Of course if you have fields with " represented as "", you
can forget about what I said, make sure all your fields are
in enclosed in " to resolve ambiguities, and if it doesn't
work report it as a bug. Or something like that.

//C - feels horribly confused today.

-- 
 Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280
 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/
 Amiga user since '89, and damned proud of it too.


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

Reply via email to