Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to sync. sequence number and SQL*Loader input?
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