vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello, I have to create an AFTER UPDATE trigger that needs to perform an UPDATE on the same table. I understand this is a recursive situation and I'm wondering if there is a way to NOT go through all 16 levels of recursion. Ideally the UPDATE performed by the trigger would not cause the trigger to fire again, although that is what I'm expecting. If anyone has experience with creating AFTER UPDATE triggers that perform an UPDATE on the same table and keeping it from recusring at all, or atleast can you describe what will happen and the trigger recurses 16 times? Thanks in advance!! We are runing DB2 LUW v. 8.2 FP 10 on AIX 5.3 Martin |
| ||||
| martinghale@gmail.com wrote: > Hello, > > I have to create an AFTER UPDATE trigger that needs to perform an > UPDATE on the same table. I understand this is a recursive situation > and I'm wondering if there is a way to NOT go through all 16 levels of > recursion. Ideally the UPDATE performed by the trigger would not cause > the trigger to fire again, although that is what I'm expecting. > > If anyone has experience with creating AFTER UPDATE triggers that > perform an UPDATE on the same table and keeping it from recusring at > all, or atleast can you describe what will happen and the trigger > recurses 16 times? > > Thanks in advance!! > > We are runing DB2 LUW v. 8.2 FP 10 on AIX 5.3 > > Martin > Can you describe the scenario in more detail...? it sounds like you may be approaching the problem in the wrong way. E.g. perhaps a for each row trigger would be more appropriate... Cheers Serge -- Serge Rielau DB2 Solutions Development IBM Toronto Lab WAIUG Conference http://www.iiug.org/waiug/present/Fo...Forum2006.html |
| Thread Tools | |
| Display Modes | |
|
|