September 30, 2009 at 10:54 pm
Comments posted to this topic are about the item T-SQL 2008
October 1, 2009 at 1:14 am
I'm of the opinion that the answer(s) are incorrect.
CUBE and ROLLUP where already available in SQL Server 2005, so they were not introduced with SQL Server 2008.
October 1, 2009 at 1:48 am
Mighty (10/1/2009)
I'm of the opinion that the answer(s) are incorrect.CUBE and ROLLUP where already available in SQL Server 2005, so they were not introduced with SQL Server 2008.
I second this opinion.
October 1, 2009 at 1:51 am
I am also of the opinion that the answer is incorrect.
The question specifically asks for extensions (subclauses) to the GROUP BY clause.
GROUPING_ID is a function, NOT a sub-clause of the GROUP BY clause, and can only be used in the SELECT, HAVING and ORDER BY clauses.
October 1, 2009 at 2:45 am
Warren Gilbert (10/1/2009)
I am also of the opinion that the answer is incorrect.The question specifically asks for extensions (subclauses) to the GROUP BY clause.
GROUPING_ID is a function, NOT a sub-clause of the GROUP BY clause, and can only be used in the SELECT, HAVING and ORDER BY clauses.
i'm with you on this
October 1, 2009 at 3:30 am
Mighty (10/1/2009)
I'm of the opinion that the answer(s) are incorrect.CUBE and ROLLUP where already available in SQL Server 2005, so they were not introduced with SQL Server 2008.
SQL Server 2005 and before supported WITH CUBE and WITH ROLLUP. These are now deprecated since they can be replaced by using GROUPING SETS with the new CUBE and ROLLUP functions.
October 1, 2009 at 3:59 am
Hugo Kornelis (10/1/2009)
Mighty (10/1/2009)
I'm of the opinion that the answer(s) are incorrect.CUBE and ROLLUP where already available in SQL Server 2005, so they were not introduced with SQL Server 2008.
SQL Server 2005 and before supported WITH CUBE and WITH ROLLUP. These are now deprecated since they can be replaced by using GROUPING SETS with the new CUBE and ROLLUP functions.
In BOL 2005 when they describe the arguments they don't mention the WITH. But if I follow your reasoning, then the correct way of writing the answers should be CUBE() and ROLLUP(), making CUBE and ROLLUP also incorrect.
The whole point is that the answers to the question left room for interpretation.
October 1, 2009 at 5:10 am
The question was "SQL Server 2008 introduces several extensions (subclauses), to the GROUP BY clause"
GROUPING_ID is not part of the GROUP BY clause!
If CUBE and ROLLUP were indeed part of SQL2005 then I got it wrong anyway as I thought these were new in 2008 🙁
October 1, 2009 at 5:23 am
I almost selected all them figuring it was a trick question. I guess that what I should have done because I missed it as well. :unsure:
http://brittcluff.blogspot.com/
October 1, 2009 at 5:35 am
I totally agree that the answer is incorrect and grouping_id is not a sub-clause, the group by subclauses listed at the following link http://technet.microsoft.com/en-us/library/ms177673.aspx did not list Grouping_ID as a sub_clause. It is treated more like an aggregate, because the columns in the function/aggregate must appear in the group by clause with a sub-clause, see http://technet.microsoft.com/en-us/library/bb510624.aspx.
:hehe:
Rick Karpel
October 1, 2009 at 5:47 am
I agree, in my opinion GROUPING_ID belongs to the SELECT clause, not the GROUP BY clause.
October 1, 2009 at 6:47 am
Warren Gilbert (10/1/2009)
I am also of the opinion that the answer is incorrect.The question specifically asks for extensions (subclauses) to the GROUP BY clause.
GROUPING_ID is a function, NOT a sub-clause of the GROUP BY clause, and can only be used in the SELECT, HAVING and ORDER BY clauses.
I agree
Bhavesh
.NET and SQL Server Blog
October 1, 2009 at 7:02 am
I agree as well that GROUPING_ID is not a sub clause of GROUP BY.
October 1, 2009 at 7:10 am
Mighty (10/1/2009)
I'm of the opinion that the answer(s) are incorrect.CUBE and ROLLUP where already available in SQL Server 2005, so they were not introduced with SQL Server 2008.
I'll add my vote that the answer is incorrect. What has changed in SQL Server 2008 is the syntax. Per the BOL:
The GROUP BY clause has an ISO-compliant syntax and a non-ISO-compliant syntax. Only one syntax style can be used in a single SELECT statement. Use the ISO compliant syntax for all new work. The non-ISO compliant syntax is provided for backward compatibility.
October 1, 2009 at 7:14 am
Mighty (10/1/2009)
I'm of the opinion that the answer(s) are incorrect.CUBE and ROLLUP where already available in SQL Server 2005, so they were not introduced with SQL Server 2008.
CUBE and ROLLUP are older. They started at least with SQL Server 2000.
Viewing 15 posts - 1 through 15 (of 45 total)
You must be logged in to reply to this topic. Login to reply