Subject | Re: [firebird-support] Update on joined tables |
---|---|
Author | Magnus Titho |
Post date | 2005-07-12T06:34:33Z |
Winston wrote:
set tableA.field2 = (select tableB.field2 from tableB where
tableA.field1 = tableB.field1)
should work.
--
Magnus
> Hi everyone,update tableA
>
> 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
set tableA.field2 = (select tableB.field2 from tableB where
tableA.field1 = tableB.field1)
should work.
--
Magnus