Re: [firebird-support] How to skip a trigger in the same trigger?

2016-04-14 Thread Gabor Boros gaborbo...@yahoo.com [firebird-support]
2016. 04. 14. 14:00 keltezéssel, Dimitry Sibiryakov s...@ibphoenix.com [firebird-support] írta: > 14.04.2016 13:57, Gabor Boros gaborbo...@yahoo.com [firebird-support] wrote: >> I have TBL_MASTER, TBL_DETAIL(this contains ISDEFAULT). You suggest a >> TBL_DETAIL_DEFAULTS table? > > No, I

Re: [firebird-support] How to skip a trigger in the same trigger?

2016-04-14 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
14.04.2016 13:57, Gabor Boros gaborbo...@yahoo.com [firebird-support] wrote: > I have TBL_MASTER, TBL_DETAIL(this contains ISDEFAULT). You suggest a > TBL_DETAIL_DEFAULTS table? No, I suggest to add DefaultDetail field into TBL_MASTER referencing default record in TBL_DETAIL. -- WBR,

Re: [firebird-support] How to skip a trigger in the same trigger?

2016-04-14 Thread Gabor Boros gaborbo...@yahoo.com [firebird-support]
2016. 04. 14. 13:27 keltezéssel, Dimitry Sibiryakov s...@ibphoenix.com [firebird-support] írta: > You'd better to remove IsDefault field at all and create a reference to > default record > in other table. I have TBL_MASTER, TBL_DETAIL(this contains ISDEFAULT). You suggest a

Re: [firebird-support] How to skip a trigger in the same trigger?

2016-04-14 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
Hello Gabor, >>> First question: why do you have an UPDATE in a BEFORE UPDATE >> trigger on ? >> >>The table have many fields and a UNIQUE constraint with four fields, one >>the ISDEFAULT from it (only one default accepted for groups of rows >>depend on the other three fields (which included

Re: [firebird-support] How to skip a trigger in the same trigger?

2016-04-14 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
Hello Gabor, >> Hi, >> >> First question: why do you have an UPDATE in a BEFORE UPDATE >> trigger on ? > >The table have many fields and a UNIQUE constraint with four fields, one >the ISDEFAULT from it (only one default accepted for groups of rows >depend on the other three fields (which

Re: [firebird-support] How to skip a trigger in the same trigger?

2016-04-14 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
14.04.2016 13:24, Gabor Boros gaborbo...@yahoo.com [firebird-support] wrote: > The table have many fields and a UNIQUE constraint with four fields, one > the ISDEFAULT from it (only one default accepted for groups of rows > depend on the other three fields (which included also in the UNIQUE) >

Re: [firebird-support] How to skip a trigger in the same trigger?

2016-04-14 Thread Gabor Boros gaborbo...@yahoo.com [firebird-support]
2016. 04. 14. 13:09 keltezéssel, 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support] írta: > Hi, > > First question: why do you have an UPDATE in a BEFORE UPDATE > trigger on ? The table have many fields and a UNIQUE constraint with four fields, one the ISDEFAULT

Re: [firebird-support] How to skip a trigger in the same trigger?

2016-04-14 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
Hi, First question: why do you have an UPDATE in a BEFORE UPDATE trigger on ? 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

[firebird-support] How to skip a trigger in the same trigger?

2016-04-14 Thread Gabor Boros gaborbo...@yahoo.com [firebird-support]
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