Hi,Bryan.
Try this..
CREATE OR REPLACE TRIGGER
"DBA_LOG_USER"."TRIG_DBAS_DBA_ID"
before INSERT ON "DBA_LOG_USER"."DBAS"
is
v_dba_id number;
BEGIN
select SEQ_DBAS_DBA_ID.NEXTVAL
into v_dba_id
from dual;
:new.DBA_ID := v_dba_id;
END;
Inna
- "Miller, Bryan" <MillerB_at_telergy.net> wrote:
> I am trying to set up a Trigger to put the NEXTVAL
> of a Sequence into a
> field of a table after the other fields have been
> inserted with data. The
> trigger is valid and enabled yet it does not put the
> NEXVAL in the new row.
> The trigger is as follows:
>
> CREATE OR REPLACE TRIGGER
> "DBA_LOG_USER"."TRIG_DBAS_DBA_ID"
> AFTER INSERT ON "DBA_LOG_USER"."DBAS"
> BEGIN
> UPDATE DBAS
> SET DBA_ID = SEQ_DBAS_DBA_ID.NEXTVAL;
> END;
>
> Bryan M. Miller
> Junior Oracle DBA
> IT Operations
> Telergy Inc.
> Email: bmiller_at_telergy.net
> Phone: (315)362-2642
> Pager: (315)647-1908
>
>
> --
> Please see the official ORACLE-L FAQ:
> http://www.orafaq.com
> --
> Author: Miller, Bryan
> INET: MillerB_at_telergy.net
>
> Fat City Network Services -- (858) 538-5051 FAX:
> (858) 538-5051
> San Diego, California -- Public Internet
> access / Mailing Lists
>
> To REMOVE yourself from this mailing list, send an
> E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of
> 'ListGuru') and in
> the message BODY, include a line containing: UNSUB
> ORACLE-L
> (or the name of mailing list you want to be removed
> from). You may
> also send the HELP command for other information
> (like subscribing).
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
Received on Mon Sep 25 2000 - 13:54:57 CDT