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 -> PL/SQL Triggers

PL/SQL Triggers

From: Roy Nielsen <rni_at_slv.dk>
Date: 1997/05/30
Message-ID: <338ec5ad.16168799@news.uni-c.dk>#1/1

Hello

Could anyone please explain me, how to make an trigger which is inserting an sequence value to a tablefield when a new record is inserted.
I have tried something like this:

create or replace trigger mytrigger
before insert on wintcc.alarm

begin

   select seqmyname.nextval
   into :new.alarmid
   from dual;
end;

but this doesn't work, my eror msg is that new.alarmid is invalid.
I can however declare a variable and then select into this.
BUT how do insert the value into the table ???? Received on Fri May 30 1997 - 00:00:00 CDT

Original text of this message

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