Sorry for the confusion, maybe I wasn't clear in the question.  I reread my
post and thought it might be misunderstood.

The data in my CSV file isn't all zeros, but the timestamp column in my
table is all zeros.

According to the timestamp docs, auto update of the first timestamp column
occurs if the column isn't specified in an INSERT or LOAD DATA INFILE
statement.

Let's say that my table has 3 columns (last is a timestamp type).  My CSV
file has two columns.  Shouldn't my timestamp column get auto updated using
LOAD DATA INFILE?

Thanks,
Mark

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 02, 2004 2:17 PM
To: Mark Riehl
Cc: [EMAIL PROTECTED]
Subject: Re: Load Data and Timestamps


An invalid datetime, or in your case, an empty value, will be set to the 
nearest zero value representation.

>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 3/2/04, 1:06:50 PM, Mark Riehl <[EMAIL PROTECTED]> 
wrote regarding Load Data and Timestamps:


> All - I'm running MySQL 4.0.13 under Red Hat 9.

> I've defined a table, and the last column is a timestamp type.

> 
+-------------+------------------+------+-----+---------+----------------+
> | Field       | Type             | Null | Key | Default | Extra          
|
> 
+-------------+------------------+------+-----+---------+----------------+
> | id          | int(10) unsigned |      | UNI | NULL    | auto_increment 
|
> | dataType    | varchar(64)      |      | PRI |         |                
|
> | description | tinytext         | YES  |     | NULL    |                
|
> | dbName      | tinytext         | YES  |     | NULL    |                
|
> | directory   | tinytext         | YES  |     | NULL    |                
|
> | updated     | timestamp(14)    | YES  |     | NULL    |                
|
> 
+-------------+------------------+------+-----+---------+----------------+


> I'm using load data to parse local CSV files.  All of the columns are 
> being properly parsed and inserted into the tables, however, the 
> timestamp column is  always all zeros (0000000).

> I don't have a column in the CSV file that maps to the timestamp 
> column (didn't think I needed it based on the documentation).

> An insert off the command line with a standard insert works fine, 
> timestamp has the proper value in it.

> Any suggestions?

> Thanks,
> Mark






> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    
http://lists.mysql.com/[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to