How to settle down ORA-04098 problem [message #116525] |
Wed, 20 April 2005 09:04 |
GuteNacht
Messages: 16 Registered: April 2005
|
Junior Member |
|
|
When I update the table "report_trigger", the trigger "MAO" should be triggered. But I came across the ORA-04098 problem: trigger MAO is invalid and failed re-validation.
How to settle this problem, please?
Thanks.
The trigger script is :
CREATE OR REPLACE TRIGGER mao
AFTER UPDATE OF updatetime
ON report_trigger
FOR EACH ROW
DECLARE
d_endtime report.endtime%TYPE;
d_today DATE;
BEGIN
SELECT endtime
INTO d_endtime
FROM report
WHERE id=:new.id;
d_today := SYSDATE ;
IF :new.id = 98 AND TRUNC(d_endtime) < TRUNC(d_today) THEN
daily13( d_endtime, d_today );
daily4( d_endtime, d_today );
daily5( d_endtime, d_today );
daily6( d_endtime, d_today );
wip_daily( d_endtime, d_today );
testdaily2( d_endtime, d_today );
END IF;
IF :new.id = 99 AND TO_CHAR(d_endtime,'MON') != TO_CHAR(d_today,'MON') THEN
monthly1( d_endtime, d_today );
monthly3( d_endtime, d_today );
monthly4( d_endtime, d_today );
monthly5( d_endtime, d_today );
END IF;
IF :new.id = 95 AND TRUNC(d_endtime) < TRUNC(d_today) THEN
UPDATE report
SET updatetime = d_today
WHERE id= 95;
wip_weekly( d_endtime, d_today );
END IF;
UPDATE report
SET bgtime = d_endtime, endtime = d_today
WHERE id=:new.id;
END mao;
|
|
|
|
|