error in query

  • Thread starter Thread starter lavanya
  • Start date Start date
L

lavanya

I use access 2000 and have the following query

SELECT count(distinct book_num), county
FROM TblSAIC_Total_Log
group by county;

this gives me an error
'syntax error (missing operator) in query expression 'count
(distinct book_num)'

the same query goes through without the count aggregate
function.
would appreciate any help.
 
Lavanya,

the item in your parentheses is not a valid format.
That is where you are missing your operator.
Is "didstinct book_num" the field name? If so you need to
put it within square brackets ([]).

HTH

AJ
 
JET / Access does not support the use of the DISTINCT keyword as you did.

Check the JET SQL Reference section in Access Help for proper use of
"DISTINCT".

HTH
Van T. Dinh
MVP (Access)
 
Back
Top