I have 2 tables with the same columns. The first table Temp1 is loaded with a sp and is temporary. It is used to load a table T1 on a production environment. By example, I have this data :
Table Temp1
Id Col1 Col2 Col3 Col4 Col5
2 null null 0.5 null 0.6
3 0.1 null null null null
Table T1
Id Col1 Col2 Col3 Col4 Col5
1 2 3 0.4 5 0.6
2 5 4 6 4 7
3 8 9 7 10 1
I need to update T1 with data from Temp1 only when columns from Temp1 are not null and have not the same value in T1 (bold values in my example).
I’m stuck with this problem. Any ideas please ?
Thanks,