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 |
|
vijmeena
Starting Member
10 Posts |
Posted - 2002-07-26 : 00:54:09
|
| I want to use the query option in XP_sendmail to send the results of the query. How can I send the subtotals at the end of each criteria.For e.g.Region Code Name AmountR01 1 Sita 100R01 2 Geeta 500 Total - 600R02 1 Reena 200R02 2 Deena 400R02 3 Lata 300 Total - 900 |
|
|
dsdeming
479 Posts |
Posted - 2002-07-26 : 08:23:05
|
| This seems to be more a query question that one about xp_sendmail. If you want to get subtotals out of a simple query, I suspect that WITH ROLLUP is the best you're going to do. See Summarizing Data Using ROLLUP in BOL. |
 |
|
|
|
|
|