Grouping Sets

  • Revenant (8/30/2011)


    Thank you, Dee! It compelled me to re-read GROUPING SETS.

    Thank you Revenant. It is a great new feature for grouping and set based query.

  • Thanks for this question. As a relative newbie I think I will find this useful in future.

  • tim.kay (8/30/2011)


    Thanks for this question. As a relative newbie I think I will find this useful in future.

    It can really cut down on the number of times you use UNION ALL. 😎

  • SanDroid (8/30/2011)


    Thank you Tom.

    It was your reply to my comments that inspired me to write this question.

    So I would call it inspiration before plagerism. 😉

    This question is based on one posted before.

    http://www.sqlservercentral.com/questions/T-SQL/64301/

    The example scripts, and the answer, are not the same.:cool:

    The important difference, I think, is that in your version the answer is right while in the previous version the answer was wrong. :smooooth:

    Tom

  • Hi, this "grouping sets" available in sql server 2005 i tried it shows error...is it in advanced version.

  • sathishmcc (8/30/2011)


    Hi, this "grouping sets" available in sql server 2005 i tried it shows error...is it in advanced version.

    This feature is not available in SQL Server 2005. It works with SQL Server 2008 and newer.

  • Tom.Thomson (8/30/2011)


    SanDroid (8/30/2011)


    Thank you Tom.

    It was your reply to my comments that inspired me to write this question.

    So I would call it inspiration before plagerism. 😉

    This question is based on one posted before.

    http://www.sqlservercentral.com/questions/T-SQL/64301/

    The example scripts, and the answer, are not the same.:cool:

    The important difference, I think, is that in your version the answer is right while in the previous version the answer was wrong. :smooooth:

    Tom I seriously apreciate that. I respect your opinion always. 🙂

  • sathishmcc (8/30/2011)


    Hi, this "grouping sets" available in sql server 2005 i tried it shows error...is it in advanced version.

    That is correct. I began the question with

    SQL Server 2008 introduces GROUPING SETS

    so that thier would not be any confusion about the server version that supports it.

  • Great question. I love the ones that show me something new.

    Kenneth FisherI was once offered a wizards hat but it got in the way of my dunce cap.--------------------------------------------------------------------------------For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/[/url]Link to my Blog Post --> www.SQLStudies.com[/url]

  • Got new thing . thx

    Thanks
    Vinay Kumar
    -----------------------------------------------------------------
    Keep Learning - Keep Growing !!!

  • Interesting! according to msdn "GROUPING SETS can generate a result equivalent to that generated by a simple GROUP BY, ROLLUP or CUBE operation."

    Thank you,

    Iulian

  • Nice question on Grouping Sets.

Viewing 12 posts - 16 through 26 (of 26 total)

You must be logged in to reply to this topic. Login to reply