﻿--------------------------------------------------------
--  DDL for Trigger CUR_TASK_MST
--------------------------------------------------------

CREATE OR REPLACE EDITIONABLE TRIGGER "MIRLE"."CUR_TASK_MST" 
AFTER UPDATE OF END_TIME ON CUR_TASK_MST 
BEGIN
    insert into HIS_TASK_MST 
    select CUR_TASK_MST.*, systimestamp as "HISTORY_TIME" from CUR_TASK_MST where end_time is not null;
    delete CUR_TASK_MST where end_time is not null;
END;
/
ALTER TRIGGER "MIRLE"."CUR_TASK_MST" ENABLE;
