cricketbird
Registered User.
- Local time
- Today, 14:14
- Joined
- Jun 17, 2013
- Messages
- 111
Currently, if my data in a given column is: (1, 2, 3, 4, 5, (missing), 7, 8, 9), then when I sum these I get 39, whereas I want to get NULL because in my business case I can't sum these values if I don't have all these values. I don't want to return a partial sum.
So, in a simple query, I'd have:
How do I get it to return NULL if there is missing data?
(if anyone uses R, I'm trying to do:
So, in a simple query, I'd have:
SQL:
SELECT Sum([MyColumn]) AS [SumOfMyColumn]
FROM MyTable;
How do I get it to return NULL if there is missing data?
(if anyone uses R, I'm trying to do:
sum(x, na.rm = FALSE)
Last edited: