Re: 'insert or update trigger' to update the same table
Date: 27 Aug 2001 23:48:41 -0700
Message-ID: <31d3e92a.0108272248.136d2004_at_posting.google.com>
Anders ?ISO-8859-1?Q?Karb?? <znake_at_lazy.dk> wrote in message news:<20010827.22163118_at_mis.configured.host>...
> You have to state your goal more precise.
> If you only intent to update the ”current” record (i.e. The record
>
> already being procesed in the trigger) then dont use sql-statement, but
>
> only normal plsql-code.
> Simply set
> if (:new.status = true ) then
> :new.desc = =to char(sysdate);
> end if;
>
> (I take that the serial is a unique key simply is eferring to the record
> already being processed in the trigger)
> If you really want to update other records (than the actual one being
> processed) in a trigger then you must use a whole diferent approach.
>
Hi Anders!
Thanks for the respond, but actually it still doesn't solve my
problem. I want to update other record from the table.
This is my OBJ table
ID DESCR STATUS SERIAL
1 A true 0 2 B true 1 3 C true 1 4 D false 2 5 D true 2 6 E true 3 7 F true 2
etc
ID is the primary key.
If I update a row in OBJ for example row 7, my trigger has to update
the descr of row 5, since it has the same serial.
The version of my oracle is 8.05
thanks a lot...
sien
Received on Tue Aug 28 2001 - 08:48:41 CEST