SET ANSI_WARNINGS ON >>SET ANSI_NULLS ONQA uses ODBC which sets both values to ON by default. A stored procedure uses SET ANSI_NULLS settings at the time of it's creation. Any SET ANSI_NULLS inside stored procedure are ignored. See BOL for more details.