Sql loader h@ll 2004-12-05 - By Stephens, Chris
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@(protected) control=3Dx.ctl log=3Dx.log
In the log file I get :
Record 1: Rejected - Error on table x, column OP_DATE.
ORA-01861 (See ORA-01861.ora-code.com): literal does not match format string
Record 2: Rejected - Error on table x, column OP_DATE.
ORA-01861 (See ORA-01861.ora-code.com): literal does not match format string
What in the world am I missing?
--
http://www.freelists.org/webpage/oracle-l
|
|