User Tools

Site Tools


kurs:journal_trigger
-- Start of DDL Script for Trigger HR8.MH_TEST_JN
-- Generated 07.12.2005 14:58:18 from HR8@WIFI.local

CREATE OR REPLACE TRIGGER mh_test_jn
 AFTER
  INSERT OR DELETE OR UPDATE
 ON mh_test
REFERENCING NEW AS NEW OLD AS OLD
 FOR EACH ROW
declare
  v_type varchar(10);
  v_wert varchar2(30);
begin
if inserting then
  v_type := 'I';
  v_wert := :new.wert;
elsif deleting then
  v_type := 'D';
  v_wert := :old.wert;
else
  v_type := 'U';
  v_wert := :old.wert;
end if;

  insert into mh_test_jn (
    wert,
    change_date,
    change_type,
    orig_ind)
  values (
    v_wert,
    sysdate,
    v_type,
    nvl(:new.ind, :old.ind));
end;
/


-- End of DDL Script for Trigger HR8.MH_TEST_JN
kurs/journal_trigger.txt · Last modified: 2014/09/10 21:22 (external edit)