Oracle触发器创建时不报错,更改相关数据时报 触发器无效且未通过重新验证 的错
CREATEORREPLACETRIGGERUPDATE_ZFZTAFTERUPDATEOFpaystatusONuf_fkjsdFOREACHROWBEGINIF:OL...
CREATE OR REPLACE TRIGGER UPDATE_ZFZT
AFTER UPDATE OF paystatus
ON uf_fkjsd
FOR EACH ROW
BEGIN
IF :OLD.trade_type='F5-Cxx-1' THEN
UPDATE formtable_main_161 SET zfzt=NEW.paystatus WHERE lcbh=:OLD.Bill_no;
ELSIF :OLD.trade_type='F5-Cxx-2' OR OLD.trade_type='F5-Cxx-3' THEN
UPDATE formtable_main_163 SET zfzt=NEW.paystatus WHERE lcbh=:OLD.Bill_no;
ELSE
UPDATE formtable_main_162 SET zfzt=NEW.paystatus WHERE lcbh=:OLD.Bill_no;
END IF;
END; 展开
AFTER UPDATE OF paystatus
ON uf_fkjsd
FOR EACH ROW
BEGIN
IF :OLD.trade_type='F5-Cxx-1' THEN
UPDATE formtable_main_161 SET zfzt=NEW.paystatus WHERE lcbh=:OLD.Bill_no;
ELSIF :OLD.trade_type='F5-Cxx-2' OR OLD.trade_type='F5-Cxx-3' THEN
UPDATE formtable_main_163 SET zfzt=NEW.paystatus WHERE lcbh=:OLD.Bill_no;
ELSE
UPDATE formtable_main_162 SET zfzt=NEW.paystatus WHERE lcbh=:OLD.Bill_no;
END IF;
END; 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询