Subject Update more than one column in only one row with a trigger:
Author fridge_n
Probably it is a newbie question but after hours of surfing and trying I hope somebody can help me.
I want to update two columns in one row out of a different table with a before update trigger.
What I can create is an update of one column in one row.

Beneath is what I have used:
>as
>begin
>if (old.field_a is null and new.field_a>0) then
> update table_2
>set new.field_b = (select field_2 from table_1
>where field_1 = new.field_a);
>end

I would expect that the next sample would work, but it doesn't.

>as
>begin
>if (old.field_a is null and new.field_a>0) then
>update table_2
>set (new.field_b, new.field_c) = (select field_2, field_3 from table_1
>where field_1 = new.field_a);
>end

I can't compile it, the error start at the “(” after set. I really haven't got a clue.

Could anybody help.
Thanks in advance,
fridge_n