But my test result is different with you,here is my test
mysql> truncate table c_t;
Query OK, 0 rows affected (0.00 sec)
mysql> load data infile '/tmp/Book1.csv' into table c_t fields
terminated by ',' lines terminated by 'w';
Query OK, 1 row affected (0.00 sec)
Records: 1 Deleted: 0 Skipped: 0
The CSV engine requires that every field be surrounded by double quotes.
If your text has double quotes, escape them or change them.
If you don't have that kind of time...
You may want to do this the weird way using Microsoft Access.
1. Install MyODBC (Takes like 30 seconds or less)
2.
Hi Hiep,
Here's what I do when I need to do that. First save it as a .csv file
and then follow this:
load data infile '/path/to/file' into table MyTable fields terminated
by '\t' lines terminated by 'w'
that has always worked for me.
Hope it helps!
On Jan 14, 2008, at 10:51 AM, Hiep Ng