Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Sql loader h@ll

Sql loader h@ll

From: Stephens, Chris <ChrisStephens_at_pqa.com>
Date: Sun, 5 Dec 2004 11:25:57 -0500
Message-ID: <0C36D9C74ADA844292F3218A9C6345442B95E4@exchange.pqa.local>

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_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-l
Received on Sun Dec 05 2004 - 10:23:33 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US