Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
hrishy
Starting Member
47 Posts |
Posted - 2008-09-12 : 01:37:10
|
HiI have a dataset like thisName AssetClass StatusABC Mortgage GoodABC Insurance BadGXZ Travel Good............ I need to write a query that provides subtotals for the status feild is it possible in a single sql any ideas on how to achieve thisresult needs to beName AssetClass StatusABC Mortgage GoodGXZ Travel Good----------------------------------------- 2ABC Insurance Bad---------------------------------------- 1.............. |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-09-12 : 02:53:22
|
quote: Originally posted by hrishy HiI have a dataset like thisName AssetClass StatusABC Mortgage GoodABC Insurance BadGXZ Travel Good............ I need to write a query that provides subtotals for the status feild is it possible in a single sql any ideas on how to achieve thisresult needs to beName AssetClass StatusABC Mortgage GoodGXZ Travel Good----------------------------------------- 2ABC Insurance Bad---------------------------------------- 1..............
Where do you want to show the data?MadhivananFailing to plan is Planning to fail |
 |
|
|
hrishy
Starting Member
47 Posts |
Posted - 2008-09-12 : 08:20:52
|
| HiI want to display the data in sqlserver management studio output or in CSV formatregardsHrishy |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-09-12 : 08:24:02
|
quote: Originally posted by hrishy HiI want to display the data in sqlserver management studio output or in CSV formatregardsHrishy
Read about ROLLUP operator in sql server help fileMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|