From: Jason Haar Date: March 15 1999 12:21am Subject: Does MySQL handle CSV files in which records _don't_ end on a CR? List-Archive: http://lists.mysql.com/mysql/217 Message-Id: <19990315132143.C26478@trimble.co.nz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii I'm dumping Outlook "Contacts" into CSV files in the desire to import them into MySQL. The resultant CSV file begins with a line defining all the field names, and then the rest of the file is the data. Some of the data contains CR/LFs, so each record doesn't necessarily end on a CR - however - as there are 84 fields (defined in line 1), then there are 84 comma-delimited "areas" in the rest of the file. MySQL "LOAD FILE" doesn't seem to get this - it just reads to the first CR it sees and then defaults the rest of that record's fields to NULLs. Is this a bug, or does anyone have a script or something that'll "clean up" CSV files into a format MySQL would like? I've looked at perl's CSV modules, and they appear (at first glance) to suffer from the same problem. MySQL-3.22.6-alpha under Linux. -- Cheers Jason Haar Unix/Network Specialist, Trimble NZ Phone: +64 3 3391 377 Fax: +64 3 3391 417