Results 1 to 2 of 2

Thread: [RESOLVED] Condense a Recordet?

  1. #1
    Join Date
    Mar 2006

    resolved [RESOLVED] Condense a Recordet?

    I have a problem that I'm sure is simple to solve but I can't seem to find the answer....

    I have a table that contains the following data:

    column1 column2 column3
    100 5.75 3
    100 5.75 1
    100 5.75 5
    130 3.00 1
    130 3.00 4

    What I need is to sum column3 based on column1 and I want it to return to rows

    column1 column2 column3
    100 5.75 9
    130 3.00 5

    As I write this I am thinking some sort of Select Distinct and Sum(column3) something along those lines...

    Any help appreciated.


  2. #2
    Join Date
    Mar 2006
    Alright I found answer within a few minutes of posting this... Sorry for the inconvience.

    SELECT column1, column2, SUM(column3) AS quantity FROM #tempcalc WHERE proid=@user GROUP BY column1, column2

    For any future use. I hate finding post like this that someone didn't supply their answer to the problem. Thanks

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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