CREATE OR REPLACE TRIGGER Trigger_1_creating_for_update
AFTER UPDATE ON Table_1
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
DECLARE
L_ms Table_1.column1%TYPE;
pragma autonomous_transaction;
BEGIN
IF UPDATE(Table_1.column1,Table_1.column3,Table_1.column4)
INSERT INTO new_created_table
(TIME_STAMP,
MSG,
ACTION_SEQ,
HOST_NAME,
IP_ADDRESS,
OS_USERNAME,
USER_ID,
col1,
col2,
col3
)
VALUES
(TO_CHAR(SYSDATE, 'MM-DD-YYYY HH24:MI:SS'),
SUBSTR(DBMS_UTILITY.FORMAT_CALL_STACK,1,3000),
sttm_hist_track_log.nextval,
SYS_CONTEXT('U1', 'HOST'),
SYS_CONTEXT('U1', 'IP_ADDRESS'),
SYS_CONTEXT('U1', 'OS_USER'),
NVL(GLOBAL.USER_ID,'**'),
:NEW.ac_stat_no_dr,
:NEW.ac_stat_no_cr,
:NEW.ac_stat_dormant
);
commit;
EXCEPTION
WHEN OTHERS THEN
DEBUG.PR_DEBUG('AC', 'Trigger_1_creating_for_update FAILED IN WOT ' || SQLERRM);
END;
/