Hi,
Can you define ROLLUP in SQL SERVER 2005.
Thanks
RollUp in Sql Server
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Satyapriya NayakRank #47 · 31.5K reputationPosted Jan 28, 2012, 2:43 AM EST
The ROLLUP operator is useful in generating reports that contain subtotals and totals. The ROLLUP operator generates a result set that is similar to the result sets generated by the CUBE operator.
ROLLUP generates a result set that shows aggregates for a hierarchy of values in the selected columns.
ROLLUP work with the "Group By " clause its main functioning comes into existance when we use Group by. We can get sub-total of row by using the Rollup funtion.When result is return by Group By class first row display the grand total or we can say that the main total.
syntax:-select firstcolumn,secondcolumn,sum(thirdcolumn) from tablename group by firstcolumn,secondcolumn with rollup order by firstcolumn
Please refer the below link
http://blog.sqlauthority.com/2010/02/24/sql-server-introduction-to-rollup-clause/
Thanks
Prabhu RajaRank #861 · 2.6K reputationPosted Jan 28, 2012, 4:53 AM EST
Hope this will help you.
http://chiragrdarji.wordpress.com/2008/09/09/group-by-cube-rollup-and-sql-server-2005/
Jignesh TrivediRank #16 · 50.3K reputationPosted Jan 29, 2012, 6:01 PM EST
please refer,
http://blogs.msdn.com/b/craigfr/archive/2007/09/21/aggregation-with-rollup.aspx
http://sqlandme.com/2011/07/07/sql-server-tsql-group-by-with-rollup/
http://blog.sqlauthority.com/2010/02/24/sql-server-introduction-to-rollup-clause/