Professional Web Applications Themes

ASP Group Same Records and Give Total Count - ASP Database

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]gilambry.com[/email]...

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

  2. #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" <gilambry.com> wrote in message
    news:73a4f99a.0408061146.156487ddposting.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]gilambry.com[/email]

    Aaron [SQL Server MVP] Guest

Similar Threads

  1. Getting Total Item Count in Paging Datagrid
    By jason smith in forum ASP.NET Data Grid Control
    Replies: 6
    Last Post: October 28th, 07:26 PM
  2. Verity total doent count
    By Tom Jordahl in forum Coldfusion Server Administration
    Replies: 0
    Last Post: May 17th, 02:27 PM
  3. Replies: 3
    Last Post: May 11th, 07:43 PM
  4. total record count in datagrid
    By DC Gringo in forum ASP.NET Data Grid Control
    Replies: 1
    Last Post: March 4th, 08:32 PM
  5. Any serverscript to count total images in a folder
    By sraval in forum Macromedia Flash Actionscript
    Replies: 0
    Last Post: February 10th, 05:00 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