Subject Re: [firebird-support] Re: tricky trigger
Author Dimitry Sibiryakov
On 1 Aug 2006 at 7:04, martinknappe wrote:

>Maybe I just didn't see the woods for trees; you're completely right -
>this is semantically the same; I changed that. But it still doesn't
>work and I mean just that: It seem it doesn't do anything. Just
>imagine 2 entries like the following:

I just have done everything you wrote and guess what? The record
got updated. Here are my table and trigger:

CREATE TABLE DIC (
ID INTEGER,
ASTERM VARCHAR(20),
AID INTEGER,
AASTERM VARCHAR(20)
);

SET TERM ^ ;
/* Trigger: DIC_CASCADE */
CREATE TRIGGER DIC_CASCADE FOR DIC
ACTIVE BEFORE UPDATE POSITION 0
as
begin
update dic set aasterm=new.asterm where aid=new.id;
end^

May be you didn't commit reading RR transaction and that's why you
saw not the freshest data?..

--
SY, Dimitry Sibiryakov.