SQL Loader: referencing Primary Key

From: Thierry Delessert <thierry.delessert_at_usa.net>
Date: Wed, 5 May 1999 06:34:46 +0200
Message-ID: <372fcb16_at_news.datacomm.ch>



Hi
I've to load a File into two tables with SQL Loader. While loading data I generate a sequence number for the Primary Key of the first table. For the second table I generate a primary key too. One field (Foreign Key) has to get the value of PK. How can I get the generated Sequence of the first table
(first INTO TABLE Tab1 instruction) to put it in the second table (INTO
TABLE Tab2 instruction).

e.g.
...
INTO TABLE Tab1
(PK_Tab1 SEQUENCE(MAX,1))

...
INTO TABLE Tab2
(PK_Tab2 SEQUENCE(MAX,1),

FK_Tab1 ? -> value of PK_Tab1)
...

Please let me know how and the script to adopt in detail at the earliest.

thanks in advance.
Greetings
Td Received on Wed May 05 1999 - 06:34:46 CEST

Original text of this message