Re: Counting

From: Tom Ellison (tellison_at_jcdoyle.com)
Date: 03/31/04


Date: Wed, 31 Mar 2004 13:46:43 -0600

Dear Karen:

Use an aggregate ("Totals") query something like this:

SELECT AccountNumber, COUNT(*) AS AccountNumberCount
  FROM YourTable
  GROUP BY AccountNumber
  HAVING COUNT(*) > 1

This will show all the Account Numbers that appear more than once, and
the number of times each appears. You can substitute Address for
AccountNumber and it will do addresses.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts

On Wed, 31 Mar 2004 11:29:07 -0800, "Karen"
<anonymous@discussions.microsoft.com> wrote:

>I need to know if a name or account number or address
>appears more than once in a VERY LARGE database. I cannot
>assign a value to search for -- I need to know if any
>appear more than once.



Relevant Pages

  • Re: Finding missing keys
    ... >>Here is an example I copied from MVP Tom Ellison ... >>SELECT AccountNumber ... >>consecutive number is missing. ... >>Microsoft Access MVP ...
    (microsoft.public.access.queries)
  • Re: Finding missing keys
    ... >SELECT AccountNumber ... >consecutive number is missing. ... >Tom Ellison ... >Ellison Enterprises - Your One Stop IT Experts ...
    (microsoft.public.access.queries)
  • Re: Need to query missing numbers in list
    ... >>SELECT AccountNumber ... >>consecutive number is missing. ... >>Tom Ellison ... >>Microsoft Access MVP ...
    (microsoft.public.access.queries)
  • Re: Finding missing keys
    ... Here is an example I copied from MVP Tom Ellison ... SELECT AccountNumber ... consecutive number is missing. ...
    (microsoft.public.access.queries)
  • Re: Need to query missing numbers in list
    ... SELECT AccountNumber ... consecutive number is missing. ... Tom Ellison ... Microsoft Access MVP ...
    (microsoft.public.access.queries)