Re: Can I use user-generated sequences in SQL*Load?

From: Andy Hardy <aph_at_ahardy.demon.co.uk>
Date: 1995/11/06
Message-ID: <815689407snz_at_ahardy.demon.co.uk>#1/1


In article <47hpi0$77j_at_homer.alpha.net> sahmad_at_mfa.com "Saad Ahmad" writes:
> Andy Hardy (AndyHard_at_istel-is.demon.co.uk) wrote:
> > Hi,
 

> > I'm using sqlload to populate some tables - one of the fields requires
> > population with a sequence number generated by a users CREATE SEQUENCE
> > statement.
 

> > Is there a way of referring to this sequence during the load?
 

> > At the moment, I have to perform an update of the table at a later date!
>
> you can give a sql string for a field value which can have seq.nextval.
> You would have to specify that sql loader should commit after each reacod
> because otherwise it would probably use the same sequence value for
> all the table rows until it commits.

The sequence.nextval worked fine - I didn't need to perform commits after each record.

I'm still debating whether the introduction of the sequence during the SQLLOAD is faster than performing a DIRECT load and then updating... I expect to have up to 15m rows...

Andy

-- 
Andy Hardy (Internet: aph_at_ahardy.demon.co.uk, CIS: 100015,2603)
PGP key available on request
===============================================================
  This fortune doesn't exist. Roll once on the Doesn't Exist table:


          1d6        Result         Colour
          --------------------------------
          1-3        Doesn't anyway Stomach Pink
          4-6        Never did      Toenail Yellow


                 -- adapted from Revised Monsters and Machineguns
                                   Player's Leaflet.
Received on Mon Nov 06 1995 - 00:00:00 CET

Original text of this message