Yumeng Xu
Yumeng Xu

Reputation: 247

How to Update Table A column 3 with input from Table B column 3 Teradata

Attached is my solution but it shows error expect something between column3 and from

update table_A
set table_A.column3 = table_B.column3 
from table_A
join table_B on (table_A.column1 = table_B.column1 and
                 table_A.column2 = table_B.column2);

Upvotes: 0

Views: 211

Answers (1)

dnoeth
dnoeth

Reputation: 60482

Update requires implicit join syntax:

update table_A
from table_A, table_B
set table_A.column3 = table_B.column3 
where (table_A.column1 = table_B.column1 and
       table_A.column2 = table_B.column2);

I fixed the order of keywords, too.

Upvotes: 1

Related Questions