Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Update for Derive Tables - forum topic by nevermore

$
0
0

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: 

Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>