SQLLoader: Problem importing LONG RAW fields from text file
Date: Thu, 27 Jul 2006 17:38:35 +0200
Message-ID: <44c8ddff$0$47958$4fafbaef_at_reader3.news.tin.it>
Hi all,
I'm a pretty newbie with Oracle and SQLLoader. I have to import a CSV file into an Oracle table, having a LONG RAW field (a generic binary data block).
But I can't actually import the file because SQLLoader rejects all the rows. The error reported in log file is similar to the following (translated from italian, of course):
Record 1: Rejected - Error in table MYTABLE, column BINARYDATA. The variable length field is too long.
Destination table has the following structure:
CREATE TABLE "USER"."MYTABLE"
(
"CODE" VARCHAR2(10) NOT NULL,
"DESCRIPTION" VARCHAR2(100) NOT NULL,
"BINARYDATA" LONG RAW,
"OPTIONS" NUMBER(10) NOT NULL,
CONSTRAINT "SYS_C0035579" PRIMARY KEY("CODE")
)
The control file is:
UNRECOVERABLE
LOAD DATA
INFILE 'MYTABLE.dat'
REPLACE
INTO TABLE MYTABLE
TRAILING NULLCOLS
(
Code CHAR TERMINATED BY "," OPTIONALLY ENCLOSED BY '"',
Description CHAR TERMINATED BY "," OPTIONALLY ENCLOSED BY '"',
BinaryData LONG VARRAW(100000) NULLIF BinaryData=BLANKS,
Options INTEGER EXTERNAL
)
A sample of the CSV file to import:
"A1","Empty BinaryData",,100 "A2","Zero lenght BinaryData",00000000,123456 "A3","BinaryData 8 bytes",000000080102030405060708,123457
I can't understand why SQL*Loader rejects ALL the records above!
Any help will be greatly appreciated.
TIA Bye
Raf
Funk: cooler than the other side of the pillow. Received on Thu Jul 27 2006 - 17:38:35 CEST