Hello guys, I have a query that returns me the following: PROBLEMNAME PROBLEMCOUNT ----------- ------------ A 5 B 10 C 7 D 9 I want also to get the sum of my problem counts on each row if possible so that the response looks like this: PROBLEMNAME PROBLEMCOUNT SUM ----------- ------------ --- A 5 31 B 10 31 C 7 31 D 9 31 31 being the sum of my problemcounts (5 + 10 + 7 + 9 = 31) Is there a way to do this? Thanks in advance, Mike
Mike, You can use "Sum()" function. In SQL reporting, Sum(Fields!PROBLEMCOUNT) In SQL Query, Select PROBLEMNAME, PROBLEMCOUNT, Sum(PROBLEMCOUNT) from <Table Name>
Kindly don't duplicate posts. Luis Martin Moderator SQL-Server-Performance.com All in Love is Fair Stevie Wonder All postings are provided “AS IS†with no warranties for accuracy.