expsigladb.Trigger.ai_l_ass_comp_doc_cont_nmp.trg Maven / Gradle / Ivy
CREATE OR REPLACE TRIGGER AI_L_ASS_COMP_DOC_CONT_NMP AFTER INSERT ON ASS_COMP_DOC_CONT_NMP for each row
DECLARE
lASS_COMP_DOC_CONT_NMP L_ASS_COMP_DOC_CONT_NMP%rowtype;
lTbName varchar2(30);
lUser varchar2(30);
lLogRegistry log_registry%rowtype;
lPG_STORICO number;
begin
--
-- Trigger attivato su INSERT di record da ASS_COMP_DOC_CONT_NMP
--
-- Date: 08/04/2004
-- Version: 1.0
--
-- Dependency:CLASS_COMP_DOC_CONT_NMP
--
-- History:
--
-- Date: 08/04/2004
-- Version: 1.0
-- Creazione
--
-- Body:
select user into lUser from dual;
lTbName :='ASS_COMP_DOC_CONT_NMP';
select nvl(max(PG_STORICO_),0) into lPG_STORICO from L_ASS_COMP_DOC_CONT_NMP;
lASS_COMP_DOC_CONT_NMP.CD_CDS_COMPENSO := :NEW.CD_CDS_COMPENSO;
lASS_COMP_DOC_CONT_NMP.ESERCIZIO_COMPENSO := :NEW.ESERCIZIO_COMPENSO;
lASS_COMP_DOC_CONT_NMP.CD_UO_COMPENSO := :NEW.CD_UO_COMPENSO;
lASS_COMP_DOC_CONT_NMP.PG_COMPENSO := :NEW.PG_COMPENSO;
lASS_COMP_DOC_CONT_NMP.CD_CDS_DOC := :NEW.CD_CDS_DOC;
lASS_COMP_DOC_CONT_NMP.ESERCIZIO_DOC := :NEW.ESERCIZIO_DOC;
lASS_COMP_DOC_CONT_NMP.PG_DOC := :NEW.PG_DOC;
lASS_COMP_DOC_CONT_NMP.CD_TIPO_DOC := :NEW.CD_TIPO_DOC;
lASS_COMP_DOC_CONT_NMP.UTCR := :NEW.UTCR;
lASS_COMP_DOC_CONT_NMP.UTUV := :NEW.UTUV;
lASS_COMP_DOC_CONT_NMP.DACR := :NEW.DACR;
lASS_COMP_DOC_CONT_NMP.DUVA := :NEW.DUVA;
lASS_COMP_DOC_CONT_NMP.PG_VER_REC := :NEW.PG_VER_REC;
lASS_COMP_DOC_CONT_NMP.PG_STORICO_ := lPG_STORICO + 1;
lASS_COMP_DOC_CONT_NMP.USER_ := lUser;
lASS_COMP_DOC_CONT_NMP.DT_TRANSACTION_ := sysdate;
lASS_COMP_DOC_CONT_NMP.ACTION_ := 'I';
CLASS_COMP_DOC_CONT_NMP.insertRiga(lTbName,lASS_COMP_DOC_CONT_NMP);
CLASS_COMP_DOC_CONT_NMP.updateRegistry(lTbName,'I',lUser);
END;
/
© 2015 - 2024 Weber Informatics LLC | Privacy Policy