Subject Re: [firebird-support] Is it possible to cancel UPDATE with update trigger ?
Author Alexandre Benson Smith

Mr. John wrote:
> Hi !
> Is it possible to cancel update inside UPDATE trigger and perform delete and insert ?
> I have complex triggers for insert and delete and instead of writing also an update trigger i want to force
> update =delete+insert.
> Thanks.

I don't remember if I already did something like that.. but I believe so...

Create trigger TU_Table for Table before update as
Delete from Table where PK = old.PK;
Insert into Table (Pk, Col1, Col2) values (new.PK, new.Col1, New.Col2);

see you !

Alexandre Benson Smith
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil