Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Trigger : Newbie problem
Daniel schrieb:
>
> Hi,
>
> How to implement a trigger before delete who updates records of the same
> table ?
> I've tried :
>
> (trigger COMPTE.TBS_DELETECOMPTE before delete)
>
> begin
> update compte set cpt_parent = :old.cpt_parent
> where cpt_parent = :old.cpt_code and cpt_annee=:old.cpt_annee;
> end;
>
> But It doesn't work. (ORA-04091 - ORA04088).
>
Hi
This will never do!
You've got to define a packaged PL/SQL-table that your trigger can access. Within the row-level trigger fill your table with the deleted values and within an after-statement-level trigger handle the stored values.
HTH
matthias
--
Matthias.Gresz_at_Privat.Post.DE
Always log on the bright side of life.
http://www.stone-dead.asn.au/movies/life-of-brian/brian-31.htm
Received on Fri Jan 15 1999 - 04:43:31 CST