Subject Re: [firebird-support] How can I distinguish "explicit deleting" by "cascade deleting" ?
Author Milan Babuskov
ricfio wrote:
> On the trigger TAB_R_AD0 I would distinguish the two record deleting
> from TAB_R:
> a) Explicit deleting (By User)
> DELETE FROM TAB_R WHERE ...
> b) Cascade deleting (By Engine)
> DELETE FROM TAB_H WHERE PK_TAB_H="X"
> =>
> DELETE FROM TAB_R WHERE FK_TAB_H="X"
>
> N.B.
> I cannot use MON$ tables for this because I have more DELETE FROM
> TAB_R (see above A) in the same transaction.

I haven't tried it myself, but maybe you can combine a custom context
variable with current_transaction or something like that.

--
Milan Babuskov
http://www.flamerobin.org
http://www.guacosoft.com