Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

counts needed on all unique variables in a field

Status
Not open for further replies.

learnfox2

Technical User
Jul 10, 2007
5
US
Hello,
if I want a total count on all unique values in a specific field what is the command?

I rememeber something like

count(*) for fieldname.....

or something like that. Keep in mind I only want to count each line once.

Thanks
 
Are you trying to find out how many different values there are or how many there are of each value. Dave's answer tells you how many of each.

For how many different values, try:

Code:
SELECT COUNT(DISTINCT fieldname) AS UniqueValues ;
  FROM YourTable ;
  INTO CURSOR UniqueCount

Tamar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top