Counting of multiple records

Results 1 to 2 of 2

Thread: Counting of multiple records

  1. #1
    Vargus Guest

    Default Counting of multiple records

    Hello gurus, here&#039;s what I&#039;m trying to accomplish and I hope you can help.<BR><BR>In my Access database, I&#039;ve got a field named "ClientCities" and in that field is data such as...<BR>Los Angeles<BR>Minneapolis<BR>Los Angeles<BR>Los Angeles<BR>New York<BR>Orlando<BR>New York<BR><BR>Something like that. I have a main ASP page that indicates (as a digit) how many times Los Angeles, Orlando, New York, etc appears. For example...<BR><BR>Los Angeles ... 3<BR>New York ... 2<BR>Minneapolis ... 1<BR><BR>And so on...<BR>Is there a simple way to count something like this?

  2. #2
    Join Date
    Dec 1969

    Default RE: Counting of multiple records

    SELECT ClientCities, Count(ClientCities) AS CityCount <BR>FROM table <BR>GROUP BY ClientCities<BR>ORDER BY ClientCities<BR><BR>*********<BR><BR>The "ORDER BY" is optional (to put the cities in alphabetic order). The "GROUP BY" is not optional.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts