Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

RE: load data

From: Rhys Campbell <rhys.campbell(at)touchlocal.com>
Date: Wed Jul 11 2007 - 04:55:06 EDT


Can you not change your proceedure and format your dates first using DAT_FORMAT()?
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function _date-format

You could put a trigger on the table that would format the dates before insert (although I'd go for the above)

-----Original Message-----
From: Ananda Kumar [mailto:anandkl@gmail.com] Sent: 11 July 2007 06:30
To: MySQL General
Subject: Fwd: load data

 Hi All,
We have an application where we load data on a daily basis and then do some analysis and the move this data into different tables.

Data is comming in files. The date format in the file is "dd-mon-yyyy hh24:mi:ss', but as you all know, in mysql , the default date format is "yyyy-mm-dd hh24:mi:ss". How can i specifiy this format in the load data infile script.

I tried this

 LOAD DATA LOCAL INFILE 'abc.txt' INTO TABLE abc FIELDS TERMINATED BY ',' LINES TERMINATED BY '^V\n' (doj timestamp "dd-mon-yyyy hh24:mi:ss");

but data is not getting inserted.

Do you need help?X

Please help me.

regards
anandkl

This email is confidential and may also be privileged. If you are not the intended recipient please notify us immediately by telephoning +44 (0)20 7452 5300 or email postmaster@touchlocal.com. You should not copy it or use it for any purpose nor disclose its contents to any other person. Touch Local cannot accept liability for statements made which are clearly the sender's own and are not made on behalf of the firm.

Touch Local Limited
Registered Number: 2885607
VAT Number: GB896112114
Cardinal Tower, 12 Farringdon Road, London EC1M 3NN +44 (0)20 7452 5300

-- 
MySQL General Mailing List
For list archives: 
http://lists.mysql.com/mysql
To unsubscribe:    
http://lists.mysql.com/mysql?unsub=lists@pantek.com
Received on Wed Jul 11 04:55:01 2007

This archive was generated by hypermail 2.1.8 : Thu Aug 02 2007 - 01:56:52 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library