miked2miked,
Wednesday, December 04, 2002, 8:18:04 AM, you wrote:

myc> I looked at the MySQL manual and it tells you how to
myc> do automatic timestamps in TIMESTAMP columns.  I can
myc> do that fine if I use INSERT or UPDATE statements from
myc> MySQL monitor.  However, LOAD DATA INFILE delivers
myc> zeros in the TIMESTAMP column.  What am I overlooking?

myc> How can I avoid getting the string of zeros that shows
myc> up in my TIMESTAMP column when
myc> I use the LOAD DATA INFILE command?

myc> To clarify:

myc> I have three columns in my table: Column1, Column2,
myc> Column3.  Column3 is my TIMESTAMP column.

myc> I've tried to put the contents of the text file that
myc> I'm using for my LOAD DATA INFILE operation as:

myc> value1, value2, null

You should use \N instead of NULL in the text file.

myc> and I have also tried leaving out any value for
myc> Column3 (the Timestamp column) as so:

myc> value1, value2

In this case you shouldn't specify column in LOAD DATA statement, i.e.
 LOAD DATA ... INTO TABLE my_table(column1, column2) ...

myc> Either way, I get all zeros for my TIMESTAMP column.

myc> My LOAD DATA INFILE line reads as follows:

myc> load data infile "/home/mike/data.txt" into table
myc> my_table fields terminated by "," enclosed by "\"";



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com





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