stcwp
Database
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
STCW.TR_COUNTRY_H
Parameters
Name
Type
Mode
Definition
TRIGGER "STCW"."TR_COUNTRY_H" AFTER INSERT OR UPDATE OR DELETE ON COUNTRY REFERENCING OLD AS early NEW AS late FOR EACH row DECLARE action VARCHAR2(75); BEGIN IF INSERTING THEN action := 'INSERTING'; INSERT INTO STCW_HISTORY.COUNTRY_H (COUNTRY_ID,capital,description,ENUM_COUNTRY_GROUP_ID,enum_currency_id,enum_timezone_id,inspected,language,source,official_name,enum_status_id,version_id,cuser,cdate,muser,mdate, action) VALUES(:late.COUNTRY_ID,:late.capital,:late.description,:late.ENUM_COUNTRY_GROUP_ID,:late.enum_currency_id,:late.enum_timezone_id,:late.inspected,:late.language,:late.source,:late.official_name,:late.enum_status_id,:late.version_id,:late.cuser,:late.cdate,:late.muser,:late.mdate, action); ELSIF UPDATING THEN action := 'UPDATING'; INSERT INTO STCW_HISTORY.COUNTRY_H (COUNTRY_ID,capital,description,ENUM_COUNTRY_GROUP_ID,enum_currency_id,enum_timezone_id,inspected,language,source,official_name,enum_status_id,version_id,cuser,cdate,muser,mdate, action) VALUES(:late.COUNTRY_ID,:late.capital,:late.description,:late.ENUM_COUNTRY_GROUP_ID,:late.enum_currency_id,:late.enum_timezone_id,:late.inspected,:late.language,:late.source,:late.official_name,:late.enum_status_id,:late.version_id,:late.cuser,:late.cdate,:late.muser,:late.mdate, action); ELSE action := 'DELETING'; INSERT INTO STCW_HISTORY.COUNTRY_H (COUNTRY_ID,capital,description,ENUM_COUNTRY_GROUP_ID,enum_currency_id,enum_timezone_id,inspected,language,source,official_name,enum_status_id,version_id,cuser,cdate,muser,mdate, action) VALUES(:early.COUNTRY_ID,:early.capital,:early.description,:early.ENUM_COUNTRY_GROUP_ID,:early.enum_currency_id,:early.enum_timezone_id,:early.inspected,:early.language,:early.source,:early.official_name,:early.enum_status_id,:early.version_id,:early.cuser,:early.cdate,:early.muser,:early.mdate, action); END IF; END;