Question about trying to do a unique count

hammerva

Registered User.
Local time
Today, 07:59
Joined
Dec 19, 2000
Messages
102
Hello. First of all cool design of the message board. Anyway here is my question

I am trying to do the following SQL in a query:

Select count (distinct Requirement_Number)
from Quality_Control
Where Status_Number = '3325'

But I keep getting a syntax error trying to run this query. I know that I have used this Distinct thing before in a count outside of Access and it worked. Doesn't work in Access 97.

Any idea what the problem is? And way of figuring out how to work around it.

Thanks for the help :cool:
 
Nope no luck. I get an error message saying 'Syntax error (missing operator) in query expression "Count (Distinct Requirement_Number)'
 
Jet does not support this SQL syntax. You need to use either a sub query or a separate nested query.

query1:
Select distinct Requirement_Number
From Quality_Control
Where Status_Number = '3325';

query2:
Select Count(*) as DistinctRequirements
from query1;
 

Users who are viewing this thread

Back
Top Bottom