select count(distinct(column name)) from table name

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi all
i want to select count of distinct value from table
but message box appear tell me undefined function distinct
select count (distinct(column name)) from table
please help
 
hi all
i want to select count of distinct value from table
but message box appear tell me undefined function distinct
select count (distinct(column name)) from table
please help

Access does not support the ANSI standard "Count Distinct" operator.

What you'll need is a Subquery selecting distinct values, and an outer
query counting them:

SELECT ID, Count(*)
FROM (SELECT DISTINCT ID FROM yourtable)
GROUP BY ID;

John W. Vinson[MVP]
 
Back
Top