Home » RDBMS Server » Server Utilities » Problem loading the date using SQL*Loader...
Problem loading the date using SQL*Loader... [message #365801] Sat, 05 February 2000 06:44 Go to next message
Umesh Sharma
Messages: 14
Registered: February 2000
Junior Member
Dear Oracle Friends,

I am trying to load the date in Oracle using SQL*Loader from flat files. The date in ASCII file is in the format 'dd-mon-yy'. After loading when I view the date loaded using to_char() with 4 digit century the year is prefixed with 20 instead of 19. How is it possible to load the date in 4 digit year. Please let me know at the earilest.

With regards.
Re: Problem loading the date using SQL*Loader... [message #365808 is a reply to message #365801] Mon, 07 February 2000 14:12 Go to previous message
Roger Cornejo
Messages: 5
Registered: January 2000
Junior Member
I don't know if this will help or not, but consider the following SQL:
select to_char( (to_date('12/31/99','MM/DD/YY')-36525), 'DD-MON-YYYY')
from dual;
What it is doing is subtracting 36525 days from the date which will work for input date strings in 1999.
Perhaps there is a better solution. It seems like a brute force method, but you could come up with an elaborate scheme to subtract the correct number of days
depending on the input year. Alternatively, reformat the input file. to specify 4 character years.

Regards,
Roger ---|-
Previous Topic: Re: Introduce myself to thegreat DBA world
Next Topic: ORA-00222 Failed to export database
Goto Forum:
  


Current Time: Thu Apr 25 14:56:42 CDT 2024