SQL*Loader: How to populate foreign keys?

From: Todd Owers <toddo_at_gcr1.com>
Date: 1998/08/18
Message-ID: <6rcupk$tm$1_at_nntp.gulfsouth.verio.net>#1/1


[Quoted] I want to use SQL*Loader to load multiple tables. My question is this: I am populating the primary key of Table A with a sequence. I need to capture [Quoted] that value in order to use it again, to populate a foreign key in Table B.

I know the control file allows multiple INTO TABLE statements with WHEN clauses to direct the data to the appropriate table. But I need to re-use the sequence value, not data from the input datafile.

Chapter 5 of the Oracle7 Server Utilities manual states: " ...the same sequence number can be used when inserting data into multiple tables. This is frequently useful behavior. Case 3 on page 4-8 illustrates this situation." But Case 3 on page 4-8 has only one INTO TABLE statement. It does not illustrate the re-use of a sequence number.

Is there something simple I am overlooking? Any suggestions would be appreciated. Thanks in advance for your help.

Todd Owers
toddo_at_gcr1.com Received on Tue Aug 18 1998 - 00:00:00 CEST

Original text of this message