Link to home
Start Free TrialLog in
Avatar of kgittinger
kgittingerFlag for United States of America

asked on

How to do a disctinct count of null values?

How to do a disctinct count of null values?

I have a report that I need the distince count of employee numbers, but I need to exclude the null values (as they are not to be included int a given category).



Thank you very much.
ASKER CERTIFIED SOLUTION
Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This sample query could well assist you;

SELECT SUM(CASE WHEN col IS NULL THEN 1 ELSE 0 END) NullCount
FROM tableName