Re: Mutating Table in Triggers

From: Al Ruiz <arruiz_at_flash.net>
Date: Thu, 06 May 1999 00:25:49 GMT
Message-ID: <3730E32C.F6D6669D_at_flash.net>


[Quoted] Try adding an exception handler in your trigger e.g.
.
begin

...
...
...
..

exception
when others
...
...
...

end

Kjetil Nordstrand wrote:

> Or substitue the temp table with a PL record group.
>
> --
> Kjetil Nordstrand
> Karlstad, Sweden
>
> Harold Peske skrev i meddelandet ...
> >Unfortunately, there is no easy way around this. Mutating tables occurs
> >whenever you attempt to access another table that is related to the table
> >you are altering.
> >
> >The best solution is to have a Temp table that you populate with some
> >identifier in you Before or After Row Delete trigger. Then create a After
> >Statement trigger to cycle through the records in the Temp table and
> perform
> >whatever processing you require at that point. Not the cleanest solution
> >but I have used it a great deal.
> >
> >
> >Harold
> >
> >
> >
> >yitbsal_at_statcan.ca wrote in message <7egb6j$j88$1_at_nnrp1.dejanews.com>...
> >>Hi,
> >>
> >>I've got an on-delete trigger on table A that updates the parent row in
> >table
> >>B. Since the integrity relationship between tables A and B is ON DELETE
> >>CASCADE, the trigger causes problems when a row in table B is deleted.
> >>
> >>In the trigger, is there a way to check whether table B is mutating. This
> >way,
> >>I can run the update code only if table B is not mutating.
> >>
> >>Thanks,
> >>Salaam Yitbarek
> >>
> >>-----------== Posted via Deja News, The Discussion Network ==----------
> >>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
> >
> >
Received on Thu May 06 1999 - 02:25:49 CEST

Original text of this message