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 -> Re: Trigger : Newbie problem

Re: Trigger : Newbie problem

From: Matthias Gresz <GreMa_at_t-online.de>
Date: Fri, 15 Jan 1999 11:43:31 +0100
Message-ID: <369F1BD3.B2FD06C0@Privat.Post.DE>

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

Original text of this message

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