stcwp
Database
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
STCW.TR_STCW_REF_H
Parameters
Name
Type
Mode
Definition
TRIGGER "STCW"."TR_STCW_REF_H" AFTER INSERT OR UPDATE OR DELETE ON STCW_REFERENCE REFERENCING OLD AS early NEW AS late FOR EACH row DECLARE action VARCHAR2(75); BEGIN IF INSERTING THEN action := 'INSERTING'; INSERT INTO STCW_HISTORY.STCW_REFERENCE_H(STCW_REFERENCE_ID,certificate_of_competency,enum_stcw_reference_type_id,stcw_regulation,EXT_INFO,VERSION_ID,CUSER,CDATE, MUSER, MDATE, action) VALUES(:late.STCW_REFERENCE_ID,:late.certificate_of_competency,:late.enum_stcw_reference_type_id,:late.stcw_regulation,:late.EXT_INFO,:late.VERSION_ID,:late.CUSER,:late.CDATE,:late.MUSER,:late.MDATE, action); ELSIF UPDATING THEN action := 'UPDATING'; INSERT INTO STCW_HISTORY.STCW_REFERENCE_H(STCW_REFERENCE_ID,certificate_of_competency,enum_stcw_reference_type_id,stcw_regulation,EXT_INFO,VERSION_ID,CUSER,CDATE, MUSER, MDATE, action) VALUES(:late.STCW_REFERENCE_ID,:late.certificate_of_competency,:late.enum_stcw_reference_type_id,:late.stcw_regulation,:late.EXT_INFO,:late.VERSION_ID,:late.CUSER,:late.CDATE,:late.MUSER,:late.MDATE, action); ELSE action := 'DELETING'; INSERT INTO STCW_HISTORY.STCW_REFERENCE_H(STCW_REFERENCE_ID,certificate_of_competency,enum_stcw_reference_type_id,stcw_regulation,EXT_INFO,VERSION_ID,CUSER,CDATE, MUSER, MDATE, action) VALUES(:early.STCW_REFERENCE_ID,:early.certificate_of_competency,:early.enum_stcw_reference_type_id,:early.stcw_regulation,:early.EXT_INFO,:early.VERSION_ID,:early.CUSER,:early.CDATE,:early.MUSER,:early.MDATE, action); END IF; END;