Subject Re: [firebird-support] timestamp trigger?
Author Lester Caine
Fernando Salaices wrote:

> Can a BEFORE UPDATE and a BEFORE UPDATE OR INSERT coexist? Because my
> table already has a BEFORE INSERT trigger.

Create the he table with

and add an extra BEFORE UPDATE trigger with

Works fine for me. And I create a log of the all changes from the BEFORE
UPDATE which copies some of the :OLD data to another table.

( I believe that the statement about triggers SHOULD say - from 1.5 you
can create a trigger with UPDATE, INSERT AND DELETE in the one trigger -
prior to 1.5 you had to duplicate the trigger when you needed the same
things both on INSERT and UPDATE. You can add a number of triggers as
long as they have different names, and order the sequence they are used
in is specified with the POSITION number )

Lester Caine - G8HFL
L.S.Caine Electronic Services -
Model Engineers Digital Workshop -
Treasurer - Firebird Foundation Inc. -