* [EMAIL PROTECTED] > Hie there, > I'm having a potential problem with Load Data Infile function > where i'm unable to get the right no. of records to appear in the table. I > have a table created in MySQL with 2 fields region (char 1)-pkey and > regionname (char 30). The table name is called region. I've also created a > text file(Test.txt) with the following contents > > "1","New Record 1" > "2","New Record 2" > "3","New Record 3" > > My SQL load statement is: > > Load Data Infile 'test.txt' into table region fields enclosed by '"' > terminated by ","; > > The result: > Query OK, 2 rows affected > Records:2 Deleted:0 Skipped:0 Warnings:1 > > As you can see, only the 1st and 3rd lines of records are input > in, the 2nd > is ignored....any explanations?
Try appending "LINES TERMINATED BY '\r\n'" to your query... \r\n is the line ending characters on a windows machine, mysql expects only \n by default. -- Roger --------------------------------------------------------------------- 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