-
How to stop a recursive trigger in db2!!
Hi
I am trying to make a recursive trigger on a table in my db...i am using
db2...the problem is to how to stop the recursive trigger because it runs
after a table update and one of the statements is to update a column in the
table that the trigger run...I found a way in a book, to put "!" caracter,
but db2 control center or command center don't accept the sintaxe...
please, i need a help
thanks
Rodrigo
-
Re: How to stop a recursive trigger in db2!!
Rodrigo,
Well, I'm no DB2 expert, but could you set a state variable in a
temporary location (such as a row in a temp table), keyed by your session
id? In SQL Server, if you want to implement transaction-static variables,
that is one way to go. Set the value at transaction start, check it inside
the trigger, and abort if necessary. At transaction commit time, release
that state variable. (More simply, on SQL Server, is to simply disallow
nested triggers).
Regards,
D. Patrick Hoerter
Rodrigo <rveiga@brq.com> wrote in message news:3a38d995$1@news.devx.com...
>
> Hi
> I am trying to make a recursive trigger on a table in my db...i am using
> db2...the problem is to how to stop the recursive trigger because it runs
> after a table update and one of the statements is to update a column in
the
> table that the trigger run...I found a way in a book, to put "!" caracter,
> but db2 control center or command center don't accept the sintaxe...
> please, i need a help
> thanks
> Rodrigo
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks