Subject Re: [firebird-support] Re: Triggers
Author Helen Borrie
At 11:26 AM 26/07/2004 +0000, Fabrice Aeschbacher wrote:
>Take a look at the new "EXECUTE STATEMENT" in the release notes.

..with **extreme** prejudice!! The engine has no compile-time control over
what might happen in an EXECUTE STATEMENT statement. At compile time it is
simply a string!!


You should never write triggers that do anything "free-form" or
unpredictable. Trigger code will execute regardless of where the
instruction to perform the DML operation comes from - which might be from
an application statement or indeed from a rogue EXECUTE STATEMENT statement
in another trigger.


>--- In, "lartz001" <rob@c...> wrote:
> > If i want to make a trigger so that when I insert some data into a
> > set table one of the fields will contain an sql query, I want to then
> > execute that sql as a trigger.
> >
> > ie:
> >
> > insert into table (field1,sql1) values ('something', 'insert into
> > sql_table (f1,f2,f3) values (\'a\',\'b\',\'c\')');