Stephen,

> The entries in a row are
> 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?

For your import file, you should use \N instead of NULL. \N is the
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:

>     load data local infile '

> and then I dragged the textfile into the Terminal window. I was greeted 
> with:

mysql (the command line tool) is not intended for use as a drag and
drop utility. Anyway, it seems to have worked _somehow_:

>     Query OK, 1 row affected (0.44 sec)
>     Records: 1  Deleted: 0   Skipped: 0  Warnings: 3

Good chance you get the warnings because of \r\n, see above.

> Question: Where do I find these "Warnings" named and detailed?

Hmm, you have to edit my.cnf (my.ini, if you're under Windows) and
enter the following in the [mysqld] section:

warnings

Then, restart the MySQL server. From now on, warnings will be written
to the error log file, too. This log file sits in the datadir by
default. The datadir is the place where MySQL places database
directories. Under Windows, the installation default is c:\mysql\data.
The error file ends with .err; under Windows, the name is mysql.err.

Last not least, here's my advice to read the manual :)

http://www.mysql.com/doc/en

Regards,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  iConnect GmbH <http://iConnect.de>
  Heesestr. 6, 12169 Berlin (Germany)
  Telefon: +49 30 7970948-0  Fax: +49 30 7970948-3

[filter fodder: sql, mysql, query]


---------------------------------------------------------------------
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

Reply via email to