I am trying to import data into Oracle database using sqlldr.
I am using this documentation, but not successfully: sqlldr and sqlldr2
Decribing what I am doing:
create the varray type and the table:
CREATE OR REPLACE TYPE fv_integer_varray_12 AS VARRAY(12) OF INTEGER NOT NULL;
CREATE OR REPLACE TYPE VC_Array_MInteger_12 AS Object (
fv_array fv_integer_varray_12,
MEMBER FUNCTION typeDimension RETURN NUMBER ,
MEMBER FUNCTION typeName RETURN VARCHAR2);
/
CREATE TABLE fv_varray_12 (
id NUMBER,
fv fv_integer_varray_12,
PRIMARY KEY (id)
);
Create the control file:
options (errors=9999999, rows=5)
load data
characterset WE8MSWIN1252
infile '<path>'
badfile '<path>'
discardfile '<path>'
into table fv_varray_12
fields terminated by " "
( id, fv VARRAY COUNT(12) (fv))
The data to be load is:
8 18 29 38 9 16 15 14 16 18 16 13 15
9 22 31 32 8 13 18 10 15 18 16 13 13
When I try to load it through the command:
sqlldr user/pass control=imp_fv_12dim.ctl
I get the error:
SQL*Loader-403: Referenced column not present in table FV_VARRAY_12.
But it is not true as both the id and fv columns are there.
There must be something wrong in my control file. How can I fix it?