--------------------------------------------------------- -- Triggere pentru ROAOFERTA v 1.0.0 -- -- Created by marius.atanasiu on 5/04/2006, 10:32:00 AM-- --------------------------------------------------------- spool triggere.log prompt prompt Creating trigger TRG_CRM_CATEG_ARTICOLE prompt ======================================= prompt create or replace trigger TRG_CRM_CATEG_ARTICOLE before insert on CRM_CATEG_ARTICOLE referencing old as old new as new for each row begin if :new.ID_CATEG is null or :new.ID_CATEG = 0 then select SEQ_CRM_CATEG_ARTICOLE.NEXTVAL into :new.ID_CATEG from dual; end if; end TRG_CRM_CATEG_ARTICOLE; / prompt prompt Creating trigger TRG_CRM_NOTE_VANZARI prompt ===================================== prompt create or replace trigger TRG_CRM_NOTE_VANZARI before insert on CRM_NOTE_VANZARI referencing old as old new as new for each row begin if :new.ID_NOTA is null or :new.ID_NOTA = 0 then select SEQ_CRM_NOTE_VANZARI.NEXTVAL into :new.ID_NOTA from dual; end if; end TRG_CRM_NOTE_VANZARI; / prompt prompt Creating trigger TRG_CRM_POLITICI_PRETURI prompt ========================================= prompt create or replace trigger TRG_CRM_POLITICI_PRETURI before insert on CRM_POLITICI_PRETURI referencing old as old new as new for each row begin if :new.ID_POL is null or :new.ID_POL = 0 then select SEQ_CRM_POLITICI_PRETURI.NEXTVAL into :new.ID_POL from dual; end if; end TRG_CRM_POLITICI_PRETURI; / prompt prompt Creating trigger TRG_CRM_POLITICI_PRET_ART prompt ========================================== prompt create or replace trigger TRG_CRM_POLITICI_PRET_ART before insert on CRM_POLITICI_PRET_ART referencing old as old new as new for each row begin if :new.ID_POL_ART is null or :new.ID_POL_ART = 0 then select SEQ_CRM_POLITICI_PRET_ART.NEXTVAL into :new.ID_POL_ART from dual; end if; end TRG_CRM_POLITICI_PRET_ART; / spool off