I have a temp table A having 2 columns col1: ID col2: Value generated using XML. I need to update the columns in table B corresponding to column1:ID of table A with values present in col2: Value of table A. NOTE: Only specific columns and not all in table B need to be updated
table A
+----+-------+
| ID | Value |
+----+-------+
| 1 | 533 |
| 5 | 34 |
| 6 | 56 |
+----+-------+
table B
+-----+---+---+---+----+----+---+
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
+-----+---+---+---+----+----+---+
| 533 | | | | 34 | 56 | |
+-----+---+---+---+----+----+---+
declare dynsql varchar(4000) = ' update table B set....... '