This is my statement using python,
db.query("load data infile '/data/winshare/experian/test' into table d_adds fields terminated by '' escaped by '\' lines terminated by '\n'");
Is python problem? not sure.

At 10:01 AM 11/6/2002 -0600, Paul DuBois wrote:
At 10:03 -0500 11/6/02, Vivian Wang wrote:
I did my testing.
If I use ESCAPED BY '\\', I got
1064, "You have an error in your SQL syntax near ''' at line 2"

Using ESCAPED BY '\', then no error and result is fine.
If the data contains "\", then database will automatically takes "\" away and shift 1 byte left.
My data will mass up. That is why I still need "\"

I posted my syntax before, but nobody helped me to figure out.
So this time I did my test again and found out only need one "\" for ESCAPED BY.
I think there's something else wrong with the statement.  You do need
to use two backslashes to specify an escape character of a single backslash.
Can we see the entire LOAD DATA statement exactly as you specified it
originally?


At 10:43 PM 11/5/2002 -0600, you wrote:
At 14:38 -0500 11/5/02, Vivian Wang wrote:
The syntac ESCAPED BY of load data infile is wrong in http://www.mysql.com/doc/en/LOAD_DATA.html.

the [ESCAPED by '\\']
should be:
[ESCAPED BY '\']
Why do you say that?


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