Subject | Re: [firebird-support] How to skip a trigger in the same trigger? |
---|---|
Author | Martijn Tonies (Upscene Productions) |
Post date | 2016-04-14T11:09:59Z |
Hi,
First question: why do you have an UPDATE <table1> in a BEFORE UPDATE
trigger on <table1>?
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
Hi All,
I have a BEFORE UPDATE trigger for MYTABLE1 with an IF ... UPDATE
MYTABLE1 and after an IF ... INSERT INTO MYTABLE2 in it. If the UPDATE
MYTABLE1 executed the trigger fire himself and the INSERT executed
twice. How to skip it? RDB$SET_CONTEXT/RDB$GET_CONTEXT is a good
solution? I never used them before.
First question: why do you have an UPDATE <table1> in a BEFORE UPDATE
trigger on <table1>?
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
Hi All,
I have a BEFORE UPDATE trigger for MYTABLE1 with an IF ... UPDATE
MYTABLE1 and after an IF ... INSERT INTO MYTABLE2 in it. If the UPDATE
MYTABLE1 executed the trigger fire himself and the INSERT executed
twice. How to skip it? RDB$SET_CONTEXT/RDB$GET_CONTEXT is a good
solution? I never used them before.