MySQL Forums
Forum List  »  Oracle

Re: importing using LOAD DATA INFILE
Posted by: Paul Parker
Date: September 19, 2009 08:50AM

Trying to fix similar problem for a week, unable to get dates showing anything but '0000-00-00'

So thanks :-) reading about your problem saw where self going wrong :-)

Found months and days were in wrong order so produced same/similar error reports.


BT Warn - am very much an amateur here...

Suspect your Oracle 'CREATION_DATE' may be created in same format as MySQL

yyyy-mm-dd hh:mm:ss

May not need to convert it, try removing @var2 reference :


LOAD DATA INFILE '/data-dump/TEST.txt'
INTO TABLE DATE_TEST
FIELDS TERMINATED BY ',' optionally enclosed by '"' lines terminated by '\n'
(SOMEXX_ID, @var1, CREATION_DATE)
SET SUBMIT_DATE = date_format(str_to_date(@var1, '%m/%d/%Y'), '%Y-%m-%d');

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: importing using LOAD DATA INFILE
2889
September 19, 2009 08:50AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.