CREATE OR REPLACE TRIGGER triger_test
AFTER
UPDATE OF flag ON qual_ksm_from_qis
FOR EACH ROW
DECLARE
lc_qis_stat_fg CHAR(1) := '';
BEGIN
-- '진행상태 {1:미전송, 2:임시저장, 3:전송-SCP진행, 4:입고확인, 5:처리완료}' ;
SELECT DECODE(:NEW.flag, 'A', '3', 'C', '3', 'E', '3', 'G', '3', 'I', '', 'Z', '', '')
INTO lc_qis_stat_fg
FROM DUAL;
IF (:NEW.날짜컬럼 > sysdate) THEN
:NEW.여부컬럼 := 'Y';
IF (:NEW.날짜컬럼 > sysdate) THEN
ELSE
:NEW.여부컬럼 := 'N';
END IF;
--UPDATE QIS_EM_MASTER SET
DBMS_OUTPUT.PUT_LINE('변경 전 컬럼 값 : ' || :old.dname);
DBMS_OUTPUT.PUT_LINE('변경 후 컬럼 값 : ' || :new.dname);
END;
/
댓글 없음:
댓글 쓰기