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 Warnings: 0 mysql> select * from c_t\G *************************** 1. row *************************** f1: ee f2: shit ll 1 row in set (0.00 sec) 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 '\n'; Query OK, 5 rows affected (0.01 sec) Records: 5 Deleted: 0 Skipped: 0 Warnings: 0 mysql> select * from c_t\G *************************** 1. row *************************** f1: ee f2: shit *************************** 2. row *************************** f1: ll f2: ff *************************** 3. row *************************** f1: dd f2: ddss *************************** 4. row *************************** f1: ssd f2: fdfd *************************** 5. row *************************** f1: 34 f2: dsfas 5 rows in set (0.00 sec) mysql> On 1/14/08, Jason Pruim <[EMAIL PROTECTED]> wrote: > 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 Nguyen wrote: > > > hi everyone, > > > > i have a large ms excel data (text) file that i need to import to my > > table in mysql. does any one have a suggestion how to do this? i'm > > try to export to csv file, then import to my table, but i have so > > much problems with delimeters > > > > thanks > > > > > > -- > > MySQL General Mailing List > > For list archives: http://lists.mysql.com/mysql > > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > > > > > > -- > > Jason Pruim > Raoset Inc. > Technology Manager > MQC Specialist > 3251 132nd ave > Holland, MI, 49424 > www.raoset.com > [EMAIL PROTECTED] > > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] > > -- I'm a mysql DBA in china. More about me just visit here: http://yueliangdao0608.cublog.cn -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]