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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top