日期:2014-05-17 浏览次数:20910 次
CREATE OR REPLACE TRIGGER TRG_T_FMSMS AFTER INSERT OR UPDATE ON T_FMSMS FOR EACH ROW DECLARE EXIST_IT NUMBER; BEGIN SELECT COUNT(*) INTO EXIST_IT FROM TASK_EVENT WHERE TE_STATUSCODE = :NEW.F_CODE; IF EXIST_IT > 0 THEN --好像此处有错误,去掉if语块就能编译通过 INSERT INTO TASK_WAIT ('TW_BYREPORT', 'TW_REPORTFORMAT', 'TW_EMAILFORMART', 'TW_RUNTIME', 'TW_EMAILSUBJECT', 'TW_REFNO') SELECT TE_BYREPORT, TE_REPORTFORMAT, TE_EMAILFORMART, SYSDATE, TE_EMAILSUBJECT, :NEW.F_FID FROM TASK_EVENT; END IF; END;