[AccessD] Count of Unique Records

Mark Boyd MarkBoyd at McBeeAssociates.com
Wed May 28 10:03:50 CDT 2003


Jeffrey -

This gives me a count for each name, but not a total count of unique
names.

 

Mark

 

-----Original Message-----
From: jeffrey.demulling at usbank.com [mailto:jeffrey.demulling at usbank.com]

Sent: Wednesday, May 28, 2003 10:44 AM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Count of Unique Records

 


You might try something like this: 

SELECT dbo_tblOffices.Name, Count(dbo_tblOffices.Name) AS CountOfName 
FROM dbo_tblOffices 
GROUP BY dbo_tblOffices.Name; 




 

"Mark Boyd" <MarkBoyd at mcbeeassociates.com> 
Sent by: accessd-bounces at databaseadvisors.com 

05/28/2003 09:35 AM 
Please respond to accessd 

        
        To:        AccessD at databaseadvisors.com 
        cc:         
        Subject:        [AccessD] Count of Unique Records




I have a table with the following records: 
John 
John 
Bill 
Bob 
  
I need to find out how many unique records there are. 
My current approach is 1 query grouping the above table. 
Then, I get a count of grouped records with a 2nd query. 
  
Is there a way to avoid using 2 queries for this? 
The above is obviously an example.  The table actually holds thousands
and thousands of records. 
  
Thanks, 
Mark Boyd 
Sr. Systems Analyst 
McBee Associates, Inc. 
 _______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030528/38f85021/attachment-0001.html>


More information about the AccessD mailing list