Updating rows from another table

I have a table with 2 columns, Country and Qty. field country has various abbreviations of all countries. Now my task is to replace these abbreviations with the actual name of the country. Now there is another table with abbreviations and corresponding country names. I have to take the values ​​from this second table and update the first where matches match. Please, help..

+51
tsql
Apr 15 '11 at 13:15
source share
1 answer
UPDATE q SET country = a.country FROM quantity q JOIN acronym a ON a.acronym = q.country 
+70
Apr 15 2018-11-11T00:
source share



All Articles