Reported By: Tim Young Reported On: 5/20/2004 For: Version 4.05 Build 1
# 1697SQL COUNT(*) Aggregate Function Not Being Permitted in SELECT HAVING Clauses The SQL parser complains about the use of the COUNT(*) functon (specifically the *) in the HAVING clause of a SELECT statement.
SELECT Field, Count(*)
FROM MyTable
GROUP BY Field
HAVING Count(*) > 10
workaround:
SELECT Field, Count(*) AS TotalCount
FROM MyTable
GROUP BY Field
HAVING TotalCount > 10
Comments and WorkaroundsThe workaround is to use a column correlation name for the COUNT(*) function.
ResolutionFixed Problem on 5/20/2004 in version 4.06 build 1