テーブル B の別の同様の列からテーブル A の 1 つの列 (現時点では null) にデータをコピーしようとしています。
これまでのところ、私は持っています:
UPDATE a
SET a.[null column] = b.[original column]
FROM A as a
INNER JOIN B as b
ON a.id = b.idx
これを行う方法について何か考えはありますか?
UPDATE a
SET a.[column] = b.[column]
FROM A as a
INNER JOIN B as b
on a.id = b.idx and b.[column] is not null
.... where b.[original column] is not null
UPDATE a
INNER JOIN b AS b ON b.idx = a.id
SET a.column_name = b.column_name
WHERE a.column_name IN NULL
このような結合を使用できます。スキーマがあればもっといいのに