Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> What is Wrong with this Trigger?
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
![]() |
![]() |