Mutating trigger error [message #309725] |
Fri, 28 March 2008 10:31  |
shivaram9
Messages: 35 Registered: August 2006
|
Member |
|
|
Hi All,
I have a peculiar scenario where i am getting mutating trigger error.
I have table A, when this table A is updated an After update on row will fire and update a table B, then another trigger After update row level will fire on B and calls a package which will query table A (this is where i am getting mutating trigger error).
Can some one throw some light or ideas as to how i can go around with this mutating trigger issue.
One work around is
1. Global temporary table or pl/sql table
i can store the table A values in global temporary table and use it instead of query on table A, but this will be helpful when table A is updated, what if table B is updated alone and we would be looking at global temporary table for values from table A which there wont be as we did not store.
Thanks,
Shiva
|
|
|
|
Re: Mutating trigger error [message #309734 is a reply to message #309725] |
Fri, 28 March 2008 11:07  |
 |
Michel Cadot
Messages: 68737 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
This error has so many times been asked that it is no more an expert question (if it ever was).
Your design is bad, if you have a complex things to do on update then call a procedure that does the job and do not use triggers.
Regards
Michel
|
|
|