Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

sqlldr ORA-01821: date format not recognized

Guess2Dec 17 2007 — edited Dec 17 2007
my_date date "decode(:my_date,null,to_date('9999-01-01','YYYY-MM-DD'),to_date(:my_date,'YYYY-MM-DD'))"


I have a requirement that states that if my_date is null set it to January 1, 9999

what is the syntax for this? I thought about nvl, but i have to tell oracle what format anyway, so i figured that decode would accomplish that since get an else

This is in 10.2


here is the full control file

LOAD DATA
CHARACTERSET UTF8
INFILE "load.load" "var 7"
APPEND INTO TABLE mytable FIELDS TERMINATED BY ' ' ENCLOSED By "'" AND "'"
(my_id number,
my_date date "YYYY-MM-DD")

This is before adding the function

Message was edited by:
Guess2
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 14 2008
Added on Dec 17 2007
2 comments
2,412 views