ASP Group Same Records and Give Total Count

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

  1. #1

    Default 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 the same. For example.

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

    Results:
    000000-cpq = 2
    199888-001 = 2
    244166-001 = 1

    Thanks for any help in advance. [email]gil@ambry.com[/email]
    gotcha Guest

  2. Similar Questions and Discussions

    1. Getting Total Item Count in Paging Datagrid
      I'm not sure if I am just missing some obvious function call or what. I want to be able to get the overall count of the records returned from my...
    2. Verity total document count
      If you exceed the document count limits (across all collections) you are in violation of your license. Enterprise does have a 250,000 limit. --...
    3. Total Rows and count of specific instance in one read
      Is it possible to get the total number of rows and specify where clause in the same stored procedure. For instance, I am trying to get the the...
    4. total record count in datagrid
      I have a datagrid control that has paging set up and working. What I would like is a total record count (not just per page) in the header or near...
    5. Any serverscript to count total images in a folder
      I just want to count how many images in a folder Can anyone give me such .asp, php or any script, which can count no. of image in a folder, so...
  3. #2

    Default Re: ASP Group Same Records and Give Total Count

    Assuming [some column name] does not allow nulls:

    SELECT [some column name], COUNT([some column name])
    FROM [some table name]
    GROUP BY [some column name]

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




    "gotcha" <gil@ambry.com> wrote in message
    news:73a4f99a.0408061146.156487dd@posting.google.c om...
    > 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 the same. For example.
    >
    > Table:
    > 000000-cpq
    > 000000-cpq
    > 199888-001
    > 199888-001
    > 244166-001
    >
    > Results:
    > 000000-cpq = 2
    > 199888-001 = 2
    > 244166-001 = 1
    >
    > Thanks for any help in advance. [email]gil@ambry.com[/email]

    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