Introduction
Specifies ISO compliant behavior of the Equals (=) and Not Equal To (<>) comparison operators when they are used with NULL values in SQL Server.
SET ANSI_NULLS ON– Evaluates both{expression} = NULLand{expression} <> NULLasFalseif the value of{expression}isNULL. This behavior is ANSI-compliant.SET ANSI_NULLS OFF– Evaluates{expression} = NULLasTrueand{expression} <> NULLasFalseif the value of{expression}isNULL. This behavior is not recommended, because theNULLvalues should not be compared using=and<>operators.
Problem
Enable ANSI_NULLS
Solution
https://github.com/steverezhener/DBA/blob/master/Procedures/bestpractices.usp_change_ansi_nulls.sql