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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 ROLLUP - Difference between SQL 2005 and 2008

Author  Topic 

shiyam198
Yak Posting Veteran

94 Posts

Posted - 2011-09-21 : 10:44:36
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 - 2011-09-21 : 11:22:57
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
Master Smack Fu Yak Hacker

4614 Posts

Posted - 2011-09-21 : 11:29:41
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
   

- Advertisement -