I'm trying to perform a SUM function, but I only want it to return a value if all the fields are not null. Right now when it performs the SUM, it skips over NULL values and just adds up the non-nulls. What I would like to happen is, if even one value is null in the sum, it'll just return null. Here is a sample table:
Table_1
-------------
Price Quant
10.00 | NULL
11.00 | 100
Here is the query I'm running:
SELECT SUM((Price * Quant)) FROM [Table_1]
At this point, it returns a value of 1100. I'd like it to return NULL instead since the first record's Price * Quant
is null.