Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 ROLLUP - Difference between SQL 2005 and 2008
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

shiyam198
Yak Posting Veteran

94 Posts

Posted - 09/21/2011 :  10:44:36  Show Profile  Reply with Quote
Hi,

Both SQL server 2005 and SQL server 2008 is using ROLLUP.

one of our reports has this and it fails in SQL server 2005 Database. I read through roll up and I see rollup is implemented differently in SQl server 2005 and 2008.

This is the difference I see

SQL SERVER 2005
================
GROUP BY Item, Color WITH ROLLUP

SQL SERVER 2008
================
GROUP BY ROLLUP (a,b,c);


Can you please let me know why this different was made by Microsoft?
And why doesn't "GROUP BY ROLLUP (a,b,c);" work on SQL server 2005?

Thanks a lot for your time.

Thanks,
Shiyam

Grifter
Constraint Violating Yak Guru

274 Posts

Posted - 09/21/2011 :  11:22:57  Show Profile  Reply with Quote
Hi

I am learning cube and rollup myself just now so probably cannot specifically answer your question about why it does not work the same way between SQL Server versions, but here is a link that has helped me understand these functions:

http://blogs.msdn.com/b/craigfr/archive/2007/10/11/grouping-sets-in-sql-server-2008.aspx

G
Go to Top of Page

Lamprey
Flowing Fount of Yak Knowledge

4614 Posts

Posted - 09/21/2011 :  11:29:41  Show Profile  Reply with Quote
If memory serves me, 2008 allows you to use ANSI/ISO compliant syntax: GROUP BY ROLLUP (a,b,c), where as, 2005 does not. So, you should be able to use the 2005 syntax on 2008, but not vice versa.
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000