Re: SQLLdr functionality - scripting? (newbie question)

From: Anna C. Dent <anacedent_at_hotmail.com>
Date: Thu, 18 Sep 2003 17:31:35 -0700
Message-ID: <I7sab.143192$kP.123429_at_fed1read03>


Tim Smith wrote:

> Hi,
>
> If you have a delimeted text file which is to be uploaded into 2
> tables, one a parent table and the other a child table - how is this
> handled when the primary key is generated from a sequence? Also in
> general is there a PL/SQL like scripting language associated with
> Sequel Loader to special logic - like lookup up database values in
> order to populate a column?

You might want to consider loading the data into two "temporary/work" tables. The write some PL/SQL to load the real tables.

Rhetorical question -
If the primary key will be a generated sequence value, how do you know which child record to associate with the correct parent record? If you can really do this, then I suspect that one or more fields in the child data refers back to the correct parent. If so then you could directly load both tables & establish the PK/FK relationship in a 2nd pass. Received on Fri Sep 19 2003 - 02:31:35 CEST

Original text of this message