Multiple loading in SQL Loader [message #72932] |
Wed, 17 December 2003 09:13 |
sanjeev
Messages: 8 Registered: November 2000
|
Junior Member |
|
|
I am trying to load the data into two different tables.
Dat file is like this -
951,951.pdf
952,952.pdf
953,953.pdf
and my Control file is -
LOAD DATA
INFILE 'c:SqlLoadingtest.txt'
BADFILE 'c:SqlLoadingtest.bad'
DISCARDFILE 'c:SqlLoadingtest.dsc'
INTO TABLE "TABLE_1"
append
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
( col1 FILLER,
ext_fname FILLER char(40),
"IMAGE" LOBFILE(ext_fname) TERMINATED BY EOF,
LI_ID "LI_SEQ.nextval"
)
INTO TABLE "TABLE_2"
append
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
( REQ_ID integer,
col2 FILLER,
LK_ID "LK_SEQ.nextval",
L_P_KEY CONSTANT "TEST",
L_T_NAME CONSTANT "TEST",
LL_LI_ID "LI_SEQ.currval"
)
I am getting the errors in TABLE_2 -
Record 1: Rejected - Error on table "TABLE_2".
ORA-01400:cannot insert NULL into "TABLE_2"."REQ_ID")
Record 2: Rejected - Error on table "TABLE_2".
ORA-01400:cannot insert NULL into "TABLE_2"."REQ_ID")
Record 3: Rejected - Error on table "TABLE_2".
ORA-01400:cannot insert NULL into "TABLE_2"."REQ_ID")
If I load both the tables independently, it works fine, but in that case I can't use "LI_SEQ.currval".
Please let me know the solution to handle this.
Thanks.
|
|
|