Skip to Main Content

Database Software

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 date format

949661Jul 16 2012 — edited Jul 17 2012
Dear experts,
I'm trying to load txt file into table via sqlldr. I'm receiving error "Rejected - Error on table TEST_TABLE, column PERIOD_START_TIME. ORA-01843: not a valid month
The date format in flat txt file is MM:DD:YYYY; in the output table I want to have is DD.MM.YYYY
It looks that sqlldr wrongly interprets input date format - when the input is 07-08-2012 then the output is 07.08.2012 so it assumes that the input is in format MM-DD-YYYY instead of DD-MM-YYYY. And when the day is higher than 12 (13,14 etc) then an error appears

Do you know where/how to force SQLLDR to interpret it correcly? Is it somehow related to NLS_Lang. settings?



Control file looks as follow:

OPTIONS (SKIP=1)
LOAD DATA
INFILE test.txt
APPEND
INTO TABLE TEST_TABLE
FIELDS TERMINATED BY ';'
TRAILING NULLCOLS
(NE_ID,
LAC_ID,
PERIOD_START_TIME DATE 'DD.MM.YYYY HH24:MI:SS',
PERIOD_DURATION,
NSCURRENT,
NSAVERAGE
)

Table definition:

NE_ID NUMBER
LAC_ID NUMBER
PERIOD_START_TIME DATE
PERIOD_DURATION NUMBER
NSCURRENT NUMBER
NSAVERAGE NUMBER

INPUT DATA:
NE_ID;LAC_ID;PERIOD_START_TIME;PERIOD_DURATION;NSCURRENT;NSAVERAGE;
576527001;37000;07-16-2012 09:00:00;60;24846;24956;
576527001;37000;07-08-2012 10:00:00;60;1;1


Thanks in advance for any hints
Rgds
Lukasz
This post has been answered by unknown-698157 on Jul 16 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 14 2012
Added on Jul 16 2012
6 comments
82,486 views