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 help.

Re: Trigger help.

From: Ken Friday <ken_friday_at_pleasantco.com>
Date: 1998/02/07
Message-ID: <34DCD526.83B06DBD@pleasantco.com>#1/1

Table level is the same as statement level. 'mutating' means the row you're trying to modify is undergoing change in the same transaction.

Thomas J Madigan wrote:

> Hello,
>
> I am having difficulties setting up a simple trigger. What i want
> to do is this: after a insert on a table, select 2 different attributes,
> add them together and insert the result into a third addribute. I dont
> want to do a row level trigger because it doesnt make sense to have to
> operate on all the rows, just the most recent. The basic problem i
> encountered was how to select the proper row. I tried to impliment a
> statement level, after insert trigger and recieved this error:
>
> ROR at line 1:
> ORA-04082: NEW or OLD references not allowed in table level triggers
>
> i have never heard of a "table level trigger" and cant find reference to
> it anywhere. (pretty much typical for my oracle experiences).
> In another attempt, i get this error:
>
> insert into test(test_first, test_second) values(4, 3)
> *
> ERROR at line 1:
> ORA-04091: table MADIGAN.TEST is mutating, trigger/function may not see it
> ORA-06512: at "MADIGAN.PLEASE_WORK", line 7
> ORA-04088: error during execution of trigger 'MADIGAN.PLEASE_WORK'
>
> This time i have no idea what 'mutating' means. (i suspect it means
> that the table is threatening to turn into the incredible hulk.)
>
> Any help would be appreciated... (please respond by e-mail as well)
> Thanks.
>
> --
> tj madigan
> e-mail: madigan_at_mscs.mu.edu
> http://studsys.mscs.mu.edu/~madigan
Received on Sat Feb 07 1998 - 00:00:00 CST

Original text of this message

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