MERGE results with NULL values I have two tables.

One of them TABLE1 has values like this:

TABLE1

|A   |B   |C   |D   |E   |F   |G   |H   |
-----------------------------------------
|1   |NULL|4   |NULL|NULL|NULL|NULL|10  |


TABLE2 has more values compared to TABLE1.

|A   |B   |C   |D   |E   |F   |G   |H   |
-----------------------------------------
|1   |2   |3   |NULL|5   |NULL|6   |11  |


I need to update TABLE1 with values from TABLE2 for every column with NULL values on TABLE1.

The result that I need:

|A   |B   |C   |D   |E   |F   |G   |H   |
-----------------------------------------
|1   |2   |4   |NULL|5   |NULL|6   |10  |
I just found the answer myself using CASE WHEN for every column.

I was trying to achieve this because I was moving an audit table that was saving the information of the modified columns in lines (one by one) to another new table copying the whole line information (that could be many columns) in just one line.

Basically I was trying to merge the old data (old structure) to the new table.