Different values in a record set

M

Matt

Is there an easy way to determine how many diiferent values appear in a query
or table. I am not interested in how many time a particular value appears
just in counting the number of different values that appear.

Thanks in advance

Matt
 
N

Nikos Yannacopoulos

Matt,

Assuming I want to count different customers (field: CustID) invoiced in
table tblInvoices, the SQL for the query would be:

SELECT Count(qry1.CustID) AS CountOfCustID

FROM (SELECT tblInvoices.CustID FROM tblInvoices GROUP BY
tblInvoices.CustID) AS qry1



Just use your table/query and field names instead.

HTH,

Nikos
 
Top