Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: help with triggers and mutating tables

Re: help with triggers and mutating tables

From: heidi <heidistettner_at_gmail.com>
Date: 18 May 2007 08:35:39 -0700
Message-ID: <1179502539.212846.138700@q75g2000hsh.googlegroups.com>


Oops, I forgot one very important trigger:

create or replace trigger foo_bufer_trigger

    before update
    on foo
    for each row

declare
  fooPtCnt number;

begin

  fooPtCnt := foo_pkg.inserted.count+1;
  foo_pkg.inserted( fooPtCnt ).x := :new.x;
  foo_pkg.inserted( fooPtCnt ).y := :new.y;
  foo_pkg.inserted( fooPtCnt ).c := :new.c;
  foo_pkg.deleted( fooPtCnt ).x := :old.x;
  foo_pkg.deleted( fooPtCnt ).y := :old.y;   foo_pkg.deleted( fooPtCnt ).c := :old.c; end;
/ Received on Fri May 18 2007 - 10:35:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US