#Table1列uniqueId,と列cpty_id, の2つのテーブルがあります。cpty_code#Table2cpty_idcpty_codeunique_id
#Table1 の uniqueId を更新したい
お気に入り:
update #Table1
set uniqueId =
(uniqeId from #Tabel2
where #Tabel2.cpty_id=#Table1.cpty_id
and #Table2.cpty_code=#Table1.cpty_code)
オラクルで選択クエリを更新することでこれを達成する方法(ループを避けたい)
注: それらは両方の表のとuniqueIdの組み合わせに対して1 つだけです。cpty_idcpty_code