Re: SQL*Loader and Sequence Generated IDS...

From: Mike Kranzdorf <mikek_at_krt.com>
Date: 1996/11/04
Message-ID: <mikek-0411961127590001_at_ppp3.dynanet.com>#1/1


In article <3277CAC5.133F_at_ae.ge.com>, Doug Moloney <Doug.Moloney_at_ae.ge.com> wrote:

> I have a case where there is a sequence generated primary key in a table
 that will be loaded
> using SQL*Loader. Will SQL*Loader allow the key to be generated in a
before-insert trigger?

I guess there's no reason you can't write a trigger that the loading action fires, though I haven't tried it. I just use the sequence generators that Loader knows about such as MAX or SEQUENCE. They're easy if they work for you.

> The second case is that a related table needs to store the sequence
 generated key by looking it
> up by the alternate key. Will SQL*loader allow the lookup and storage
 of the key in the related
> table?

No, Loader can not do any lookups. Our approach is to load into a temp table and then run a stored procedure to do the needed work and move the data to the correct places.

Regards,

Mike Kranzdorf              mikek_at_krt.com
Kranzco Realty Trust        http://www.krt.com
Oracle Power Objects FAQ http://www.krt.com/mac/opofaq.html Received on Mon Nov 04 1996 - 00:00:00 CET

Original text of this message