|Subject||RE: [firebird-support] Re: SQL Statement that fired trigger?|
> --- In email@example.com, "Martijn Tonies"use an external table as a log
> <m.tonies@...> wrote:
> > > I would like to know if someone knows of a way to get the SQL
> > > statement that caused a trigger to fire?
> > You cannot, you can only know if it's an insert, delete or update
> > statement.
> > Martijn Tonies
> > Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB,
> Oracle &
> > MS SQL Server
> > Upscene Productions
> > http://www.upscene.com
> > My thoughts:
> > http://blog.upscene.com/martijn/
> > Database development questions? Check the forum!
> > http://www.databasedevelopmentforum.com
> Are you sure there is absolutely no way? But please do share how to
> know if it's an insert, delete or update please.
use your before insert/update/delete triggers to insert into the external
if it's an insert then insert a record called insert, if it's update insert
other than that you can't know the exact SQL unless you use a proxy to
intercept and log the SQL to/from the server.