I am trying to use "load data local infile" using MySQL 4.0.10 to load a CSV file into a database table, with very bad results: each row is loaded incorrectly whenever there are null columns in the row of the CSV file.
load data local infile '/home/me/docs/cma/data.csv' into table contacts fields terminated by ',' enclosed by '"';
For example, the rows corresponding to:
title first_name last_name company
Will load incorrectly if any of the above-mentioned fields are null in the CSV file row.
How then do I successfully load a CSV file into a MySQL file using "load data local infile"?
Thanx
Phil