Jorge Martinez wrote: > I load a table whit the query: > > LOAD DATA INFILE 'a.txt' INTO TABLE table FIELDS TERMINATED BY '\t' LINES > TERMINATED BY '\n'; > > the file: > > 211 ppp 222 ssss > 222 ooo 333 uuuo > > and more .... > > the problem is, the last field in the table is 'ssss|' or 'uuuo|' > > the final ('\n') of the line is in the field. > > > > --------------------------------------------------------------------- > 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 > >
Hi Jorge, I think you try to import a "DOS" text file. Lines in "DOS" text files are terminated by '\r\n' so what you see in the last column is not '\n' but '\r'. Try to modify the statement to LOAD DATA INFILE 'a.txt' INTO TABLE table FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\r\n'; Bye Oliver -- Good programming is 40% experience, 30% skill, 20% RTFM, 10% caffeine, and 5% attention to detail. Oliver Six, CEO CAHOS GmbH, Cimbernstr. 51, Germany 81377 Muenchen Phone +49 89 71 01 93 41, Fax +49 89 71 01 93 42 See http://www.fsf.org/philosophy/no-word-attachments.html --------------------------------------------------------------------- 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