Sql loader h@ll

  • From: "Stephens, Chris" <ChrisStephens@xxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Sun, 5 Dec 2004 11:25:57 -0500

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,             =20
OP_DATE date "DD-MM-YYYY",
)

And at the command line:

F:\oraback>sqlldr x/x@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?
--
//www.freelists.org/webpage/oracle-l

Other related posts: