Subject Re: Update more than one column in only one row with a trigger:
Author fridge_n
Thank You Dimitry,

I don't know if it will be faster (there is yet not enough data in it to see) but the code looks much better.
The only thing I changed was skipping the “:” because it wouldn't compile.
But now it is working fine.
Beneath is the working example.

as
begin
select field_2, field_3 from table_1 where field_1 = new.field_a into new.field_b, new.field_c
;
end


Regards,
fridge_n


--- In firebird-support@yahoogroups.com, Dimitry Sibiryakov <sd@...> wrote:

> When it's speed stop satisfy you, try this:
>
> as
> begin
> select field_2, field_3 from table_1 where field_1 = new.field_a into
> :new.field_b, :new.field_c
> end
>
> And trigger must be before insert or update table_2, of course.
>
> SY, SD.
>