How to load date format field using sql* loader ---URGENT [message #365805] |
Mon, 07 February 2000 10:44 |
karunakar pabba
Messages: 5 Registered: February 2000
|
Junior Member |
|
|
Hi
I have date format in my data file like 'mmddyy'and if i transfer data using sql* loader its loading but the year is loading as 2000 instead of 19xx,and also i need to use trailing nullcols in my control file as there is no data for some of columns.
Should i use to_char or to_date function in my control file for loading date column please send me the syntaxes with examples.
My data file is having ',' as field separator and also enclosed in '"' for character data type field.
PL.. SEND ME THE SOLUTION... AT THE EARLIEST.
Thanks in advance
-- karun
|
|
|
Re: How to load date format field using sql* loader ---URGENT [message #365807 is a reply to message #365805] |
Mon, 07 February 2000 14:08 |
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 ---|-
|
|
|
|
|
|