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

Home -> Community -> Usenet -> c.d.o.misc -> sequence in trigger

sequence in trigger

From: Jim Poe <jpoe_at_fulcrumit.com>
Date: 1998/03/31
Message-ID: <352168F2.39072243@fulcrumit.com>#1/1

I need an example of using a sequence in a trigger. I tried this, but I get a compiler error saying that the sequence cannot be referrenced in this context.

CREATE TRIGGER CUSTOMER_BEF_INS_KEY_ID

        BEFORE INSERT
        ON JIM.CUSTOMER
        FOR EACH ROW
        BEGIN
             :new.KEY_ID:=CUSTOMER_SEQUENCE.NextVal;
        END;

Thanks

--
Jim Poe
<jpoe_at_fulcrumit.com>
Fulcrum InteTech, Inc.
Received on Tue Mar 31 1998 - 00:00:00 CST

Original text of this message

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