UPDATE TABLE1 set TABLE1.col1 = TABLE2.col1
FROM TABLE2 INNER JOIN TABLE3 ON COL2 = TABLE2.COL2
WHERE TABLE1.COL3 = TABLE3.COL3
Will the above query work if the JOIN returns multiple rows per condition? I am unable to update it, inspite of being able individually to Join Table3 and Table2.
Please help. I hope the information is sufficient.
No, you have to choose only 1 row from Table2 – sql server will choose the any suitable row from Table2 instead.