Subject | RE: [firebird-support] Problem with my Trigger |
---|---|
Author | Leyne, Sean |
Post date | 2006-12-12T20:45:18Z |
> I changed my trigger in the following way:does
>
> AS
> begin
> if ((new.rbcard <> old.rbcard)
> or (new.anrede <> old.anrede)
> or (new.v_name <> old.v_name)
> or (new.n_name <> old.n_name)
> or (new.telefon <> old.telefon)
> or (new.handy <> old.handy)
> or (new.email <> old.email)
> or (new.comment <> old.comment)
> or (new.bonus <> old.bonus)) then
> new.last_changed = current_timestamp;
> end
>
> but the trigger workes only on some datasets. Sometimes the trigger
> not change the last_changed fieldThe correct logic should be (FB 1.5 or later)...
>
> Whats wrong now ?
begin
if ((new.rbcard IS DISTINCT FROM old.rbcard)
or (new.anrede IS DISTINCT FROM old.anrede)
or (new.v_name IS DISTINCT FROM old.v_name)
or (new.n_name IS DISTINCT FROM old.n_name)
or (new.telefon IS DISTINCT FROM old.telefon)
or (new.handy IS DISTINCT FROM old.handy)
or (new.email IS DISTINCT FROM old.email)
or (new.comment IS DISTINCT FROM old.comment)
or (new.bonus IS DISTINCT FROM old.bonus)) then
new.last_changed = current_timestamp;
end
Sean