Re: Mutating Table in Triggers

From: Kjetil Nordstrand <spammers_at_get-lost.com>
Date: Mon, 26 Apr 1999 10:58:28 +0200
Message-ID: <37242b10_at_news.sto.telegate.se>


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 Mon Apr 26 1999 - 10:58:28 CEST

Original text of this message