SQL Server's aggregate functions ignore nulls. How do I correct this?
You can simulate this by applying a where clause to your query:

with test_data (col) as (
   select null union all 
   select 1 union all
   select 2
)
select sum(col)
from test_data
where not exists (select 1 
                  from test_data
                  where col is null);


Edit

Andriy is right, this can also be written as:

with test_data (col) as (
   select null union all 
   select 1 union all
   select 2
)
select case 
          when count(*) = count(col) then sum(col)
          else null
       end
from test_data;