stcwp
Database
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
STCW.TR_MET_PROGRAMM_H
Parameters
Name
Type
Mode
Definition
TRIGGER TR_MET_PROGRAMM_H AFTER INSERT OR UPDATE OR DELETE ON MET_PROGRAMM REFERENCING OLD AS early NEW AS late FOR EACH row DECLARE action VARCHAR2(75); BEGIN IF INSERTING THEN action := 'INSERTING'; INSERT INTO STCW_HISTORY.MET_PROGRAMM_H(met_programm_id,duration,enum_unit_id,legal_entity_id,name, stcw_reference_id_1, stcw_reference_id_2, stcw_reference_id_3, approved_by,VERSION_ID,CUSER,CDATE,MUSER,MDATE, action) VALUES(:late.met_programm_id, :late.duration, :late.enum_unit_id, :late.legal_entity_id, :late.name, :late.stcw_reference_id_1, :late.stcw_reference_id_2, :late.stcw_reference_id_3, :late.approved_by, :late.VERSION_ID, :late.CUSER, :late.CDATE, :late.MUSER, :late.MDATE, action); ELSIF UPDATING THEN action := 'UPDATING'; INSERT INTO STCW_HISTORY.MET_PROGRAMM_H(met_programm_id,duration,enum_unit_id,legal_entity_id,name, stcw_reference_id_1, stcw_reference_id_2, stcw_reference_id_3, approved_by,VERSION_ID,CUSER,CDATE,MUSER,MDATE, action) VALUES(:late.met_programm_id, :late.duration, :late.enum_unit_id, :late.legal_entity_id, :late.name, :late.stcw_reference_id_1, :late.stcw_reference_id_2, :late.stcw_reference_id_3, :late.approved_by, :late.VERSION_ID, :late.CUSER, :late.CDATE, :late.MUSER, :late.MDATE, action); ELSE action := 'DELETING'; INSERT INTO STCW_HISTORY.MET_PROGRAMM_H(met_programm_id,duration,enum_unit_id,legal_entity_id,name, stcw_reference_id_1, stcw_reference_id_2, stcw_reference_id_3, approved_by,VERSION_ID,CUSER,CDATE,MUSER,MDATE, action) VALUES(:early.met_programm_id, :early.duration, :early.enum_unit_id, :early.legal_entity_id, :early.name, :early.stcw_reference_id_1, :early.stcw_reference_id_2, :early.stcw_reference_id_3, :early.approved_by, :early.VERSION_ID, :early.CUSER, :early.CDATE, :early.MUSER, :early.MDATE, action); END IF; END;