ACC: Count Function Ignores Null ValuesID: Q92747
|
Novice: Requires knowledge of the user interface on single-user computers.
When you use a query to perform a count, Null values are ignored.
SELECT Column2,
COUNT(NZ([Column2])) AS EXPR1
FROM Table1
GROUP BY Column2;
SELECT Column2,
COUNT(*)
FROM Table1
GROUP BY Column2;
This behavior is by design with all aggregate (totals) functions.
Column1 Column2
------- -------
foos
ball
foosball junk
null
notnull junk
Column2 Count(Column2)
------- --------------
0
junk 2
For more information about counts in queries, search the Help Index for "Count Function," and then view the available topics, or ask the Microsoft Access 97 Office Assistant.
Keywords : kbusage QryOthr
Version : 1.0 1.1 2.0 7.0 97
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: March 12, 1999