You are SUMming values and one or more of those values is NULL so sql ignores (eliminates) them.You can just ignore the warning message or you can SET ANSI_WARNINGS OFF to not display the warning message.You can get rid of that message by using COALESCE. But, that can also change your results if you are using other aggregate functions(average or count for example):DECLARE @Foo TABLE (ID INT)INSERT @FooSELECT 1UNION ALL SELECT 3UNION ALL SELECT 5UNION ALL SELECT NULLUNION ALL SELECT 7UNION ALL SELECT 9UNION ALL SELECT NULLUNION ALL SELECT 11UNION ALL SELECT 13SELECT COUNT(ID), COUNT(COALESCE(ID, 0))FROM @FooSELECT SUM(ID),SUM(COALESCE(ID, 0))FROM @FooSELECT AVG(ID), AVG(COALESCE(ID, 0))FROM @Foo