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 -> What is Wrong with this Trigger?

What is Wrong with this Trigger?

From: John Jennings <jjennings_at_hertz.com>
Date: Tue, 9 Feb 1999 15:41:47 -0600
Message-ID: <79qado$jk9$1@ionews.ionet.net>


I have a trigger that is supposed to stamp a date. Here is a layout of my table.

Problem_Code        varchar(15)
Date_Resolved        Date

Trigger Text:

CREATE OR REPLACE TRIGGER "EXAV"."UPD_PCODE_RESOLVED" BEFORE INSERT OR UPDATE OF "PROBLEM_CODE" ON "EXAV"."PROBLEMS" REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
WHEN (NEW.PROBLEM_CODE='RESOLVED')
BEGIN
UPDATE PROBLEMS SET DATE_RESOLVED=SYSDATE; END; Here is the error message when 'Problem_Code' = 'RESOLVED':

"Table Problems is mutating, trigger/function may not see it. ORA-06512: at
"EXAV.UPD_PCODE_RESOLVED", line 2

ORA-04088: error during execution of trigger 'EXAV.UPD_PCODE_RESOLVED' (#4091).

Any assistance is appreciated.

JJ Received on Tue Feb 09 1999 - 15:41:47 CST

Original text of this message

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