February 28, 2014 at 6:57 am
Good morning everyone.
I have the following temp file that contains the following rows. And I need a way to sum them into 1 row
by CustNum. (At the end is what I like the result set to look like). Can someone please show me how to do this in Sql 2008 r2? Thank you very much.
CustnumQtyPromoMTDShip
4430010.002.006673.80
44300 10.002.009965.62
66500 4.000.00 828.00
66500 3.000.00 560.00
Results:
CustnumQtyPromoMTDShip
4430020.004.00 16639.42
66500 7.000.001388.00
February 28, 2014 at 7:03 am
you need to use SUM aggregate function with group by on CustNum column....
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
February 28, 2014 at 7:07 am
Thank you. Will give it a try.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply