Hi,
I've 2 derived tables and want to update one column. And I couldnt find a way to mak this ok.
Can you help me pls. thanks in advance.
UPDATE TGT
FROM
(
SELECT
COL1, COL2, COL3, COL4
FROM TABLE_1 T1
INNER JOIN TABLE_2 T2 ON T1.ID = T2.ID
INNER JOIN TABLE_3 T3 ON T2.ID = T3.ID) TGT ,
(
SELECT
COL1, COL2, COL3, COL4
FROM TABLE_4 T4
INNER JOIN TABLE_5 T5 ON T4.ID = T5.ID
INNER JOIN TABLE_6 T6 ON T5.ID = T6.ID
) LRY
SET T1.COL55 = 33
WHERE LRY.COL1 = TGT.COL1
Forums: