Skip to Main Content

SQL & PL/SQL

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 issue with AM/PM

user4566776Mar 15 2011 — edited Mar 15 2011
Hello Experts,

I am unable to load data into my table in oracle 11G using sql loader.
I will put my problem in a simpler way.
SQL> sho parameter nls_date_format
nls_date_format                      string      DD-MM-YYYY HH12:MI:SS AM
SQL>
SQL> desc hero
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 DAT_1                                              TIMESTAMP(6)
hero.ctl
LOAD DATA                                                                       
INFILE 'hero.dat'                                                               
INTO TABLE HERO                                                                 
FIELDS TERMINATED BY ','                                                        
TRAILING NULLCOLS                                                               
(                                                                               
                                                                                
   DAT_1     DATE "DD/MM/YYYY HH12:MI:SS AM"                                                                  
)    
hero.log


   Column Name                  Position   Len  Term Encl Datatype
------------------------------ ---------- ----- ---- ---- ---------------------
DAT_1                               FIRST     *   ,       DATE DD/MM/YYYY HH12:MI:SS AM

Record 1: Rejected - Error on table HERO, column DAT_1.
ORA-01858: a non-numeric character was found where a numeric was expected


Table HERO:
  0 Rows successfully loaded.
  1 Row not loaded due to data errors.
  0 Rows not loaded because all WHEN clauses were failed.
  0 Rows not loaded because all fields were null.
hero.bad
"28/2/2011  11:48:00 PM"
Constraints :-

1. The data from the flat file cannot be formatted / edited / changed.
2. The table's datatypes cannot be altered.

Regards,

Valli
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 12 2011
Added on Mar 15 2011
1 comment
2,293 views