Perhaps because I'm still wet behind the ears, I brainlessly included the column heads in the textfile. Of course, that's unnecessary.
I substituted \N for NULL and stuck \n at the end of each line--the latter because I'm not on Windows. I'm actually on a Macintosh G3, running OS X.2, which is why the drag and drop maneuver works. I did continue to press <RETURN> at the end of each line, else I'd've had one incredible run-on.
But still only one record, that first one, come in ... at least as evidenced by the SELECT * FROM [table_name]. What do I try next?
And thanks again
Steve Tiano
Stephen,
The entries in a row areFor your import file, you should use \N instead of NULL. \N is the
separated by a single tab; at the end of a row, I'm hitting <RETURN>. I entered twelve rows of data. The book I'm working from shows "NULL" as some entries; and the last column, shows a timestamp in each cell of that last column. I typed "NULL" every time my sample showed it and all fourteen digits of each timestamp entry. So far, so good?
placeholder for NULL values in import files.
Also, if you happen to work under Windows, you should think of the
fact the some Windows editors will store "Return" as \r\n. MySQL,
however, will expext \n (new line) by default. If your editor is
clever enough, tell it to save the file in "Unix format" (the only
difference is it won't store \r\n but \n only). If you cannot do this,
use the LOAD DATA command like this:
LOAD DATA ... LINES TERMINATED BY '\r\n'
Back in MySQL, at the prompt, I entered:mysql (the command line tool) is not intended for use as a drag and
load data local infile '
and then I dragged the textfile into the Terminal window. I was greeted with:
drop utility. Anyway, it seems to have worked _somehow_:
Query OK, 1 row affected (0.44 sec)Good chance you get the warnings because of \r\n, see above.
Records: 1 Deleted: 0 Skipped: 0 Warnings: