Professional Web Applications Themes

Need Asp recordset Group / Count like values - ASP Database

Is there any way to group like objects, then count them in asp. I have a table with 60,000 + part numbers that I need a total of each one that is the same. For example. Table: 000000-cpq 000000-cpq 000000-cpq 000000-cpq 199888-001 199888-001 199888-001 244166-001 Results: 000000-cpq = 4 199888-001 = 3 244166-001 = 1 I can do this in access with a simple group and count, but I need to do it in asp. Thanks for any help in advance. [email]gilambry.com[/email]...

  1. #1

    Default Need Asp recordset Group / Count like values

    Is there any way to group like objects, then count them in asp. I
    have a table with 60,000 + part numbers that I need a total of each
    one that is the same. For example.

    Table:
    000000-cpq
    000000-cpq
    000000-cpq
    000000-cpq
    199888-001
    199888-001
    199888-001
    244166-001

    Results:
    000000-cpq = 4
    199888-001 = 3
    244166-001 = 1

    I can do this in access with a simple group and count, but I need to
    do it in asp. Thanks for any help in advance. [email]gilambry.com[/email]
    gotcha Guest

  2. #2

    Default Re: Need Asp recordset Group / Count like values

    gotcha wrote:
    > Is there any way to group like objects, then count them in asp. I
    > have a table with 60,000 + part numbers that I need a total of each
    > one that is the same. For example.
    >
    > Table:
    > 000000-cpq
    > 000000-cpq
    > 000000-cpq
    > 000000-cpq
    > 199888-001
    > 199888-001
    > 199888-001
    > 244166-001
    >
    > Results:
    > 000000-cpq = 4
    > 199888-001 = 3
    > 244166-001 = 1
    >
    > I can do this in access with a simple group and count, but I need to
    > do it in asp. Thanks for any help in advance. [email]gilambry.com[/email]
    The simplest (and most efficient) way to this is to use a group by query to
    retrieve the results into asp. Why can't you do this?

    Bob Barrows
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.


    Bob Barrows [MVP] Guest

  3. #3

    Default Re: Need Asp recordset Group / Count like values

    > I can do this in access with a simple group and count, but I need to
    > do it in asp.
    This doesn't make any sense. Can you elaborate?

    --
    [url]http://www.aspfaq.com/[/url]
    (Reverse address to reply.)


    Aaron [SQL Server MVP] Guest

Similar Threads

  1. Order by results of count using 'group by'
    By salvador in forum MySQL
    Replies: 3
    Last Post: August 2nd, 06:49 PM
  2. Count GROUP BY query dilemma
    By Bosconian in forum MySQL
    Replies: 5
    Last Post: December 23rd, 07:03 AM
  3. COUNT and GROUP
    By brianism in forum Coldfusion Database Access
    Replies: 2
    Last Post: December 2nd, 09:09 PM
  4. ASP Group Same Records and Give Total Count
    By gotcha in forum ASP Database
    Replies: 1
    Last Post: August 6th, 08:50 PM
  5. Group by, count, type of query beyond my ability
    By Ray at in forum Microsoft SQL / MS SQL Server
    Replies: 2
    Last Post: July 8th, 09:29 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139