Bob
My versions are Access 2000 and MySQL 4.0.20. Here's what I do.
When exporting my Access table, I choose the file type Text Files.
Then, on the next dialog box, make sure to click the Advanced button to
get to the formatting information. Change the date order to YMD and the
date delimiter to "-". That will take care of the date.
As for the NULL value. The table into which I'm importing has columns
defined to allow NULLs, but when I import the Access table with empty
columns, like you describe, it doesn't force a null -- it just leaves
the value blank. It doesn't cause any problems, but if you want to
force a NULL then I guess you could rework the exported file to state
NULL for the empty fields you want to read as such.
Wes
On Jun 28, 2004, at 10:20 PM, Robert L Cochran wrote:
2) When consecutive commas (meaning at least 1 empty column, sometimes
several) are seen, what does mysqlimport/LOAD DATA do to the
corresponding column entrie(s)? Will it set them to NULL? Or to the
default specified in the CREATE TABLE statement? Should I explicitly
set
these to NULL where permitted by the column type?
Last of all, look at this date and time stamp exported by Access:
,2/12/1998 0:00:00,
Will mysqlimport choke on this, since MySQL likes dates to be in
ccyy-mm-dd format? Will I need to reformat the date with a sed script?