Count unique values in a field

  • Thread starter Thread starter Dale
  • Start date Start date
D

Dale

Access 2000

I have a field that contains text values. There are many
duplicate values (which is normal for this field)

How can I get a count of the unique values?

TIA
Dale
 
Try...

Select [TextField], Count([TextField]) as fldcount from
YourTable Group by [TextField]
 
This solution returns a count of "each unique value".

What I am looking for is to return a "Total Count" of the
unique values.

TIA
Dale
-----Original Message-----
Try...

Select [TextField], Count([TextField]) as fldcount from
YourTable Group by [TextField]
-----Original Message-----
Access 2000

I have a field that contains text values. There are many
duplicate values (which is normal for this field)

How can I get a count of the unique values?

TIA
Dale
.
.
 
Use 'Distinct' command to get unique value
Select Distinct(FieldName) from TableName
 
I'm trying to follow this because I have the exact same problem, but this is what I have and it's just returning an error.

SELECT Count([Client Number])
FROM (SELECT DISTINCT [Client Number] FROM [Total Counseled Clients Query]

What am I doing wrong?
 
You left out the closing parenthesis at the end.

See the SQL String I posted previously.

--
HTH
Van T. Dinh
MVP (Access)



Christina said:
I'm trying to follow this because I have the exact same problem, but this
is what I have and it's just returning an error.
SELECT Count([Client Number])
FROM (SELECT DISTINCT [Client Number] FROM [Total Counseled Clients Query]

What am I doing wrong?
 
Back
Top