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: 14 May 2007 14:00:09 -0700
Message-ID: <1179176409.420170.211350@h2g2000hsg.googlegroups.com>


The code for the trigger is in my first post. I guess I should have said the relevant update code is surrounded by a loop which processes each row. Here is the loop part, as copied from the original post.

create or replace trigger seqpts_au_trigger

    after update
    on seqpoints

declare

    sum_bid_days number;
begin

  if ( seqpoints_pkg.fire )
  then
    seqpoints_pkg.fire := FALSE;

    for seqPtCnt in 1 .. seqpoints_pkg.inserted.count     loop

         processing...
    end loop;
    seqpoints_pkg.fire := TRUE;
  end if;

This is part of a package, which includes a before update trigger to initialize the seqpoints_pkg.inserted and seqpoints_pkd.deleted arrays and a before update on each row trigger which saves the :new and :old information into the arrays. Received on Mon May 14 2007 - 16:00:09 CDT

Original text of this message

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