469,631 Members | 1,776 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,631 developers. It's quick & easy.

Recursive Trigger General Question

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

Jan 10 '07 #1
1 1826
ma*********@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
Jan 11 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Andrew Edwards | last post: by
6 posts views Thread by Scott CM | last post: by
2 posts views Thread by robert | last post: by
reply views Thread by JohnO | last post: by
2 posts views Thread by Mage | last post: by
4 posts views Thread by Együd Csaba | last post: by
reply views Thread by Michael L | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.