Need Asp recordset Group / Count like values

Ask a Question related to ASP Database, Design and Development.

  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]gil@ambry.com[/email]
    gotcha Guest

  2. Similar Questions and Discussions

    1. Order by results of count using 'group by'
      Hi there, I'm querying a single table with the goal of selecting the number of distinct cities of the field 'city' where the count is greater...
    2. Count GROUP BY query dilemma
      I need help creating a list of items with a corresponding count. I have 3 tables: event staff status I need to list the statuses and count...
    3. COUNT and GROUP
      I have been searching everywhere about using COUNT to display the specific recordcount of part of my query, but I can not figure it out for...
    4. ASP Group Same Records and Give Total Count
      I need to know how to group like parts, then count them in asp. I have a table with 60,000 + part numbers that I need a total of each one that is...
    5. Group by, count, type of query beyond my ability
      Hi group, I can't figure out this query that I want. My database is as such: Table: Articles ArticleID Description
  3. #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]gil@ambry.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

  4. #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

Posting Permissions

  • You may not post new threads
  • You may 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