Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> sql loader: How to load same line with all its fields into 2 different tables before going to the next line?
What I'm trying to do is to load the same line of data (with all its
fields) to 2 different tables: Client and then Contrat.
I generate a sequence number each time I load data into Client and I
want to use this sequence number to load into Contrat before going to
the next line of data.
Here is the code I use each in a separate file, but it doesn't work
because of the sequence number:
LOAD DATA
INFILE *
APPEND
into table Client FIELDS TERMINATED BY ","
TRAILING NULLCOLS
(
field1 FILLER,
field2 FILLER,
numero_GSM,
nom_client,
field3 FILLER, field4 FILLER, field5 FILLER, field6 FILLER, field7 FILLER, field8 FILLER,
LOAD DATA
INFILE *
APPEND
into table Contrat FIELDS TERMINATED BY ","
TRAILING NULLCOLS
(
contrat_id,
compte_id,
field1 FILLER, field2 FILLER, field3 FILLER, field4 FILLER, field5 FILLER,