Nulls and the MERGE statement: I need to set a value to infinity. How?

后端 未结 9 1401
慢半拍i
慢半拍i 2021-01-01 20:51

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

9条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-01 21:12

    Have you tried SET ANSI_NULLS OFF, which will make NULL=NULL return true? This may create additional issues but it could be a script-level workaround (turn it off then on once you run your proc).

提交回复
热议问题