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!

NLS_DATE_FORMAT and sql*loader

chijarMay 20 2008 — edited May 21 2008
dear all.
Facts:
- oracle 10g r2 std edition
- centos 4.3

i have a problem. i want to upload data through sql*loader but there are date format errors.
- the data in the date field is in that format: MM/DD/YYYY
- i want to upload in that formar : DD/MM/YYYY


My *sh file have the following parameters:
# /bin/bash
export ORACLE_SID=plelpp
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
export PATH=$PATH:$ORACLE_HOME/bin
export NLS_DATE_FORMAT=DD/MM/YYYY --> THAT IS THE WAY THAT I WANT
sqlldr USERID=SYSTEM, CONTROL=datprinf.ctl, LOG=datprinf.log, data=data_generada_para_datprinf.dat, bad=datprinf.bad, discard=datprinf.dsc

My *.ctl file have this in the date fields:
FECALT DATE "DD/MM/YYYY",
In order to upload the rows i had tested too in that way:
FECALT "TO_DATE(:FECALT,'DD/MM/YYYY')",

but anything, always show me the same error:
Record 1: Rejected - Error on table SUNAT.DATPRINF, column FECALT.
ORA-01843: mes no valido



i had put the export NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1 in sh file but anyhting works...

i saw the link in metalink about Note:257909.1 but anything.

Please would you help me ???
Thanks a lot !!!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 18 2008
Added on May 20 2008
4 comments
1,087 views