0
votes

I'm trying to load the data from an xml file to a table. I get the below errors, please help me out.

Table:

CREATE TABLE TEST_XML
(FILL CHAR(30)
XMLDATA CLOB);

Here is my control file

LOAD DATA
INFILE * 
TRUNCATE INTO TABLE TEST_XML XMLType(XMLDATA)
FIELDS ( FILL FILLER CHAR(100), XMLDATA LOBFILE(CONSTANT test_file.xml) TERMINATED BY EOF ) 
BEGINDATA 0

I get the below error:

Table TEST_XML, loaded from every logical record. Insert option in effect for this table: TRUNCATE

Column Name Position Len Term Encl Datatype ------------------------------ ---------- ----- ---- ---- --------------------- FILL FIRST 100 CHARACTER (FILLER FIELD) XMLDATA
DERIVED * EOF CHARACTER
Static LOBFILE. Filename is test_file.xml

Record 1: Rejected - Error on table TEST_XML. ORA-01008: not all variables bound

1

1 Answers

0
votes

For me it is invalid syntax in control file. Oder of key word is relevant. Also like after begindata

LOAD DATA
INFILE * 
INTO TABLE TEST_XML
truncate
FIELDS
 ( FILL FILLER CHAR(100)
  ,XMLDATA LOBFILE(CONSTANT test_file.xml) TERMINATED BY EOF ) 
BEGINDATA 
0