ORA-01855: AM/A.M. or PM/P.M. [message #461080] |
Wed, 16 June 2010 08:42 |
sundarfaq
Messages: 235 Registered: October 2007 Location: Chennai
|
Senior Member |
|
|
Hi,
During the loading data into target table using sql loader i am getting ORA-01855: AM/A.M. or PM/P.M. error.
In dat file, date format looks like Jan 1 1900 12:00:00:000AM. but i want to save in database like 1900-12-1 12:00:00:000AM.
The sql loader control file looks like
load data
infile 'emp.dat'
"str '<EORD>'"
into table emp_test
fields terminated by '<EOFD>'
trailing nullcols
(
emp_date "to_char(TO_TIMESTAMP(:emp_date, 'Mon dd yyyy hh:mi:ss:ff3 AM'),'yyyy-mon-dd hh:mi:ss:ff3')",dep,name
).
but i am able to get output in sqlplus based on the above date format.
select to_char(TO_TIMESTAMP('Jan 1 1900 1:00:00:000 ', 'Mon dd yyyy hh:mi:ss:ff3 AM'),'yyyy-mon-dd hh:mi:ss:ff3 AM') from dual
Could you please give solution?
Thanks,
Michael
|
|
|
|
|