C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




What is CUBE in sql server?


Posted Date: 12 Oct 2008      Total Responses: 3

Posted By: Bindu Bujji       Member Level: Gold     Points: 1


Hi All,
what is CUBE in sql server? what is the purpose of this?? A simple note will be useful for me.
I googled it, but not able to get the answer as i don't understand what they are saying.

Thanks
Bindu




Responses

Author: Uvarajan    12 Oct 2008Member Level: SilverRating:     Points: 4
To be precise & simpler - The Cube is a keyword used in SQL to get the sum/total of each Group and the Grand total value. This can be used along with the Group By clause.

For better understanding with an example please check in the below link.

http://databases.about.com/od/sql/l/aacuberollup.htm


Author: Vivek    12 Oct 2008Member Level: GoldRating:     Points: 5
Refer These links in Sequence of Precedence

1. http://chiragrdarji.wordpress.com/2008/09/09/group-by-cube-rollup-and-sql-server-2005/

2. http://databases.about.com/od/sql/l/aacuberollup.htm

3. http://msdn.microsoft.com/en-us/library/bb522495.aspx

Chirag explianed it with nice example, follow that to know why use cube. Why Group By is not sufficient.

As you want two level of information, Sum and individual..




Author: gururajan    11 Nov 2008Member Level: GoldRating:     Points: 4
Hi,

the CUBE operator returns a result set that has one grouping for all possible combinations of columns in the CUBE list and a grand total grouping.

also see that http://msdn.microsoft.com/en-us/library/bb522495.aspx
very useful for that.

Gururajan.K


Post Reply
You must Sign In to post a response.
Next : Protect database in SqlServer2005
Previous : How to read values from dtsconfig file of SSIS package
Return to Discussion Forum
Post New Message
Category: SQL Server

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

budget conference call

Contact Us    Privacy Policy    Terms Of Use