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: Newbie: Update trigger

Re: Newbie: Update trigger

From: Michael Gast <mig-sm_at_web.de>
Date: Mon, 18 Nov 2002 13:38:04 +0100
Message-ID: <3DD8DF2C.4060200@web.de>


Hi Alessandro,

news.green.ch schrieb:
> This is correct.
> But i still have the problem, that Oracle claims like that:
>
> The following error has occurred:
>
> ORA-04091: Tabelle IASTEST.FC_UTRICHIESTA wird gerade geändert,
> Trigger/Funktion sieht dies möglicherweise nicht
> ORA-06512: in "IASTEST.FC_UTRICHIESTA_U_INFOS", Zeile 2
> ORA-04088: Fehler bei der Ausführung von Trigger
> 'IASTEST.FC_UTRICHIESTA_U_INFOS'
>
> I am missing somthing ?

No, it was my fault. In the last few years, i was primarily working with Interbase / Firebird nad it is slightly different in using triggers. Sorry for this.

For Oracle the following is valid:

create or replace trigger FC_UTRICHIESTA_U_INFOS   befor update on IASTEST.FC_UTRICHIESTA   for each row
begin

    :new.MUTADATA := SYSDATE;
end;
/

The update statement in my last posting causes the same 'mutation error' as you had before, but only on row level. What you can do, is to manipulate the :new pseudo row. This needs to use the trigger type 'before update'.

-- 
All emails sent to this address are never read and never will be
answered. Sorry, but until someone cleans up the spam mess, that's the
way it has to be.

E-Mails, die direkt an diese Adresse geschickt werden, lese und
beantworte ich nicht. Ich bedauere diesen Umstand sehr, kenne derzeit
aber keine bessere Möglichkeit, um die Spam-Flut abzustellen.

Mit freundlichen Grüßen / Best Regards
Michael Gast
SEPP MED GmbH
Received on Mon Nov 18 2002 - 06:38:04 CST

Original text of this message

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