query won't run

R

RipperT

I am writing a query that won't run in Access:

SELECT COUNT(DISTINCT enroll.grade)
FROM Enroll
where enroll.grade = 4.0

I would like it to return the number of distinct 4.0's in the table, but I
get a syntax error. The only way it will run is if I move DISTINCT in front
of COUNT, and then it returns the same result set that it does if I leave
DISTINCT out altogether. Does anyone know why?
Thanx,
Rip
 
W

Wayne Morgan

Try two queries. Get the DISTINCT you want in the first query then base the
Count query on the first one instead of directly on the table.
 
Top