Subject | Re: [firebird-support] Is it possible to cancel UPDATE with update trigger ? |
---|---|
Author | Alexandre Benson Smith |
Post date | 2009-11-10T19:48:44Z |
John,
Mr. John wrote:
Create trigger TU_Table for Table before update as
begin
Delete from Table where PK = old.PK;
Insert into Table (Pk, Col1, Col2) values (new.PK, new.Col1, New.Col2);
end
see you !
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br
Mr. John wrote:
> Hi !I don't remember if I already did something like that.. but I believe so...
> 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.
>
Create trigger TU_Table for Table before update as
begin
Delete from Table where PK = old.PK;
Insert into Table (Pk, Col1, Col2) values (new.PK, new.Col1, New.Col2);
end
see you !
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br