>>
SELECT Count(Table.Field) AS FieldNullCount FROM Table HAVING
(((Count(Table.Field)) Is Null));
Select Count(*) From [MyTable] Where [MyField] Is Null
I was referring to the "Having" clause, not the "As" renaming.
But my prior comment "I don't think so" was inappropriate.
The aggregate "Having" clause is necessary for a criterion applied to an
aggregate function such as Count(), but the query engine must first select
and process all records, and only then evaluate the aggregate function
(Count in this case) against the criterion at the end.
The "Where" clause performs the filtering during the initial record scan
prior to computing any aggregate functions, so it is more efficient. In
general, a Where clause is preferred over a Having clause. The difference is
negligible for small tables, but Where is recommended when possible.
On the other, a Having clause is necessary if you want a criterion like
"Having Min([MyField]) < 10", but it is not needed here for a filtering
criterion such as Is Null.
- Steve