Results 1 to 4 of 4

Thread: Help with Count

  1. #1
    Join Date
    Jan 2003
    Posts
    126

    Unanswered: Help with Count

    Hi all!

    I have a table that has Order Number and an Account Number, I want to count all the account numbers. However there might be more then one order number with the same account number...

    See example:


    Code:
    Table:
    
    [Order Number] [Account Number]
    12312                 1234
    13231                 2342
    14352                 1311
    23423                 1313
    11422                 1234
    
    Output should be: 4

    I want to count([account number]) and get 4, notice there are 5 rows, the 1st and last have the same account number.

    How do I write this query?

    Thanks,

    Ken

  2. #2
    Join Date
    Jan 2003
    Posts
    126
    Found the anwser I was looking for!

    select count(distinct [account number]) from table

  3. #3
    Join Date
    Oct 2001
    Location
    England
    Posts
    426
    select count(distinct [Account Number])
    from tbl

  4. #4
    Join Date
    Jan 2003
    Posts
    126
    Good timing! I found the answer just as you posted!

    Thanks for the reply!

    Ken

Posting Permissions

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