In SQL Server 2008, I\'m using MERGE. Everything is fine except that I have 2 nullable columns. If I pass a null value and the target isn\'t null, MERGE doesn\'t see a diffe
Actually, this works better. Just add another substitution value as an OR :-
WHEN MATCHED AND ( NOT (IsNull(tgt.C, 0) = IsNull(src.C, 0)) OR NOT (IsNull(tgt.C, 1) = IsNull(src.C, 1)) ) THEN ....