Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Sql loader h@ll
I've spent the last 45 minutes trying to load a extract file and cannot figure out what the problem is.
Here is what I use on the extraction:
set linesize 4000
SET PAGESIZE 0
SET FEEDBACK OFF=20
SET TRIMSPOOL ON
spool f:\oraback\x.dat
select
'^|^'||UNIT_ID||'^|^'||OP_YEAR||'^|^'||to_char(OP_DATE,'DD-MM-YYYY')||'^
|^'
from x
where op_year=3D2003
and rownum < 100
/
spool off
Here is the control file to load the data:
Load DATA
INFILE '2003UnitEmissions.dat'
APPEND INTO TABLE HOUR_UNIT_TEST
FIELDS TERMINATED BY '^|^'
TRAILING
(UNIT_ID INTEGER EXTERNAL, =20 OP_YEAR INTEGER EXTERNAL, =20OP_DATE date "DD-MM-YYYY",
And at the command line:
F:\oraback>sqlldr x/x_at_x control=3Dx.ctl log=3Dx.log
In the log file I get :
Record 1: Rejected - Error on table x, column OP_DATE. ORA-01861: literal does not match format string
Record 2: Rejected - Error on table x, column OP_DATE. ORA-01861: literal does not match format string
What in the world am I missing?
-- http://www.freelists.org/webpage/oracle-lReceived on Sun Dec 05 2004 - 10:23:33 CST
![]() |
![]() |