Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to sync. sequence number and SQL*Loader input?

Re: How to sync. sequence number and SQL*Loader input?

From: Venkat <vreddy_at_ix.netcom.com>
Date: Fri, 15 May 1998 11:18:34 -0400
Message-ID: <6jhmcm$f0p@sjx-ixn4.ix.netcom.com>


It is easier done using an insert trigger on the table being loaded. CREATE TRIGGER TBLA_ISEQTRIG BEFORE INSERT ON TBLA FOR EACH ROW BEGIN
SELECT SEQ1.NEXTVAL INTO :new.F1 FROM DUAL; END;
/

Venkat

>Table TBLA (F1 number(8,0), F2 varchar2(50))
>Sequence SEQ1 min. 1 increament by 1
>
>Usual update method
>insert into TBLA values (SEQ1.nextval, 'XXX');
>
>Now, I want to use SQL*Loader to load data (from another system) into
>this table. Can I instruct SQL*Loader to use the sequence number? If
>not, can I use the MAX function from SQL*Loader to insert the records
>first and sync. the sequence afterward?
>
>Zeus
>------------------------------------
>To send reply via mail, remove nospam from address
>
Received on Fri May 15 1998 - 10:18:34 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US