¡á¿¹ 12_1_1 || ÀÌ·ÂÀ» »ý¼ºÇÏ´Â Æ®¸®°Å
CREATE OR REPLACE TRIGGER bond.REC
AFTER INSERT OR UPDATE ON BOND.TAB_DEBTOR_LIST
FOR EACH ROW
BEGIN
INSERT INTO TAB_DEBTOR_HISTORY(DEBTOR_LIST_NO
,DEBTOR_HISTORY_SEQ
,DEBTOR_HISTORY_TEL
,DEBTOR_HISTORY_PHONE
,DEBTOR_HISTORY_ZIPCODE
,DEBTOR_HISTORY_ADDRESS_1
,DEBTOR_HISTORY_REGIST_DATE
,DEBTOR_HISTORY_INPUT
,DEBTOR_HISTORY_MGR_NUM
,DEBTOR_HISTORY_ADDRESS_2
,DEBTOR_HISTORY_NAME
,DEBTOR_HISTORY_ENGNAME
,DEBTOR_HISTORY_GOOBOON
,DEBTOR_HISTORY_ETC
)
VALUES (:NEW.DEBTOR_LIST_NO
,TO_NUMBER(TO_CHAR(SYSDATE,'YYYYMMDD')||TO_CHAR(DEBTOR_HISTORY_SEQ.NEXTVAL))
,:NEW.DEBTOR_LIST_TEL
,:NEW.DEBTOR_LIST_PHONE
,:NEW.DEBTOR_LIST_POSTAL
,:NEW.DEBTOR_LIST_ADDRESS_1
,:NEW.DEBTOR_LIST_REGIST_DATE
,:NEW.DEBTOR_LIST_INPUT
,:NEW.DEBTOR_LIST_MGR_NUM
,:NEW.DEBTOR_LIST_ADDRESS_2
,:NEW.DEBTOR_LIST_NAME
,:NEW.DEBTOR_LIST_ENGNAME
,:NEW.DEBTOR_LIST_GOOBOON
,:NEW.DEBTOR_LIST_ETC);
DBMS_OUTPUT.PUT_LINE('乫ÀÚ ¹øÈ£ :' || :NEW.DEBTOR_LIST_NO);
DBMS_OUTPUT.PUT_LINE('ÀüȹøÈ£ :' || :NEW.DEBTOR_LIST_TEL);
DBMS_OUTPUT.PUT_LINE('ÈÞ´ëÆù¹øÈ£ :' || :NEW.DEBTOR_LIST_PHONE);
DBMS_OUTPUT.PUT_LINE('¿ìÆí¹øÈ£ :' || :NEW.DEBTOR_LIST_POSTAL);
DBMS_OUTPUT.PUT_LINE('ÁÖ¼Ò1 :' || :NEW.DEBTOR_LIST_ADDRESS_1);
DBMS_OUTPUT.PUT_LINE('ÁÖ¼Ò2 :' || :NEW.DEBTOR_LIST_ADDRESS_2);
DBMS_OUTPUT.PUT_LINE('ÀԷ³¯Â¥ :' || :NEW.DEBTOR_LIST_REGIST_DATE);
DBMS_OUTPUT.PUT_LINE('ÀÔ·ÂÀÚ »ç¹ø :' || :NEW.DEBTOR_LIST_INPUT);
DBMS_OUTPUT.PUT_LINE('´ã´çÀÚ »ç¹ø :' || :NEW.DEBTOR_LIST_MGR_NUM);
DBMS_OUTPUT.PUT_LINE('乫ÀÚ À̸§ :' || :NEW.DEBTOR_LIST_NAME);
DBMS_OUTPUT.PUT_LINE('乫ÀÚ ¿µ¹® À̸§ :' || :NEW.DEBTOR_LIST_ENGNAME);
DBMS_OUTPUT.PUT_LINE('乫ÀÚ ±¸ºÐ :' || :NEW.DEBTOR_LIST_GOOBOON);
DBMS_OUTPUT.PUT_LINE('±âŸ :' || :NEW.DEBTOR_LIST_ETC);
END;
/
¡á¿¹ 12_1_3 || ÀÌ·ÂÀ» »ý¼ºÇÏ´Â Æ®¸®°Å
CREATE OR REPLACE TRIGGER bond.REC3
AFTER INSERT OR UPDATE ON BOND.TAB_DEBTOR_LIST
FOR EACH ROW
BEGIN
INSERT INTO TAB_DEBTOR_BAK(DEBTOR_LIST_NO
,DEBTOR_BAK_SEQ
,DEBTOR_BAK_TEL
,DEBTOR_BAK_PHONE
,DEBTOR_BAK_ZIPCODE
,DEBTOR_BAK_ADDRESS_1
,DEBTOR_BAK_REGIST_DATE
,DEBTOR_BAK_INPUT
,DEBTOR_BAK_MGR_NUM
,DEBTOR_BAK_ADDRESS_2
)
VALUES (:NEW.DEBTOR_LIST_NO
,TO_NUMBER(TO_CHAR(SYSDATE,'YYYYMMDD')||TO_CHAR(DEBTOR_HISTORY_SEQ.NEXTVAL))
,:NEW.DEBTOR_LIST_TEL
,:NEW.DEBTOR_LIST_PHONE
,:NEW.DEBTOR_LIST_POSTAL
,:NEW.DEBTOR_LIST_ADDRESS_1
,:NEW.DEBTOR_LIST_REGIST_DATE
,:NEW.DEBTOR_LIST_INPUT
,:NEW.DEBTOR_LIST_MGR_NUM
,:NEW.DEBTOR_LIST_ADDRESS_2);
DBMS_OUTPUT.PUT_LINE('乫ÀÚ ¹øÈ£ :' || :new.DEBTOR_LIST_NO);
DBMS_OUTPUT.PUT_LINE('ÀüȹøÈ£ :' || :new.DEBTOR_LIST_TEL);
DBMS_OUTPUT.PUT_LINE('ÈÞ´ëÆù ¹øÈ£ :' || :new.DEBTOR_LIST_PHONE);
DBMS_OUTPUT.PUT_LINE('¿ìÆí¹øÈ£ :' || :new.DEBTOR_LIST_POSTAL);
DBMS_OUTPUT.PUT_LINE('ÁÖ¼Ò1 :' || :new.DEBTOR_LIST_ADDRESS_1);
DBMS_OUTPUT.PUT_LINE('ÁÖ¼Ò2 :' || :new.DEBTOR_LIST_ADDRESS_2);
DBMS_OUTPUT.PUT_LINE('ÀÔ·ÂÀÚ »ç¹ø :' || :new.DEBTOR_LIST_INPUT);
DBMS_OUTPUT.PUT_LINE('´ã´çÀÚ »ç¹ø :' || :new.DEBTOR_LIST_MGR_NUM);
DBMS_OUTPUT.PUT_LINE('ÀԷ½ð¢ :' || :NEW.DEBTOR_LIST_REGIST_DATE);
END;
/