Subject Re: [firebird-support] Update on joined tables
Author Magnus Titho
Winston wrote:
> Hi everyone,
>
> Is there a way to update a table A with values from another table B
> when the two tables share same field value?
> I've tried this, but it doesn't work:
>
> update tableA
> inner join tableB on tableA.field1 = tableB.field1
> set tableA.field2 = tableB.field2

update tableA
set tableA.field2 = (select tableB.field2 from tableB where
tableA.field1 = tableB.field1)

should work.


--
Magnus