Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Difficult Sql Loader problem with RRRR date format

Difficult Sql Loader problem with RRRR date format

From: julio <asd_at_sds.com>
Date: 13 Apr 2002 08:37:05 -0500
Message-ID: <3cb833ca$0$40286$45beb828@newscene.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US