update ステートメント内で 3 つのテーブルを結合しようとしていますが、これまでのところ成功していません。このクエリは、2 つのテーブルを結合するために機能することを知っています。
update table 1
set x = X * Y
from table 1 as t1 join table 2 as t2 on t1.column1 = t2.column1
ただし、私の場合、次のように 3 つのテーブルを結合する必要があります。
update table 1
set x = X * Y
from table 1 as t1 join table 2 as t2 join table3 as t3
on t1.column1 = t2.column1 and t2.cloumn2 = t3.column1
動作しないでしょう。次のクエリも試しました。
update table 1
set x = X * Y
from table 1, table 2, table 3
where column1 = column2 and column2= column3
これを達成する方法を知っている人はいますか?