Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Difficult Sql Loader problem with RRRR date format
We have an 8.1.6 database on Sun server running Sun 2.7. We have an NLS date
format of MM-DD-RRRR
We have a table that is loaded from a text file via SQL Loader Table:
Name varchar
Topic varchar
Expire date
We have a text file delimited by | as follows
Joe|java|01-23-2002
Mary|VB|01-01-0001
Tom|C++|11-23-2001
We have a control file as such
Delimited by '|'
(joe char, topic char, expire Date 'MM-DD-YYYY')
The problem is with the rec for Mary. She has a date that is a low date 0001. When we run the code above we get an expire date in the table of 01-01-2001. The RRRR views the 0001 as being 2001.
We can not change the NLS date format, and we can not change the text file we get so qeuestion is:
Is it possible to do this via the SQL Loader file:
We tried 'decode(:expire, '01-01-0001', Null, to_date(:expire, 'mm-dd-yyyy') to try to convert it to a null date when its low date but it stills comes out as 2001 in the table. Anybody has any ideas?? Received on Sat Apr 13 2002 - 08:37:05 CDT