miklesw
asked on
SELECT Count(distinct field1) FROM table1 WHERE etc etc in MS Access
Is there a way of doing this in 1 query (to be used as a sub query)??? I found this example for MS SQL..
I need the count of unique values for a field...
I need the count of unique values for a field...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
OptionValuecount: (SELECT Count(OV) AS countofvalues FROM (Select Distinct SQO2.standardquestionid as stdqid, SQO2.optValue as OV from standardquestionoptions as SQO2) WHERE stdQID=[standard questions].standardquestio
Tnx
I had tried that, but access was crashing for me... I just had to move the WHERE condition outside the SELECT DISTINCT query...
seems like access doesn't support refering to a parent value from the 2nd sub-query