Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 7th, 2007, 11:51 AM
Registered User
 
Join Date: Nov 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Rollup Question

i have a list of account numbers and transactions as follows:

48700 25
48705 33
48737 6
48766 15
48772 84
48792 52

i want to show count/sum subtotals (rollup) for the sub-series groupings where the last two digits are <= 49 and >49, as such:

48700 25
48705 33
48737 6
Series Count = 3, Sum = 64
48766 15
48772 84
48792 52
Series Count = 3, Sum = 151

i can't seem to get the group by to recognize the column alias i use for the account # last-two-digit substring so i can then use the rollup to give me the subtotals...how do i do this?

thanks so much in advance.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Select errors on Count() w/ rollup for a datagrid cJeffreywang ASP.NET 2.0 Basics 0 April 7th, 2008 07:14 PM
Assistance with Rollup and Cube Jinn SQL Server 2000 2 November 5th, 2006 10:18 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.