Note You receive the correct result in this scenario if you use the FORCE ORDER query hint in a query.
The query optimizer handles the GROUP BY predicate for the multiple columns in a physical operator of the execution plan. However, the operator outputs all the grouped columns in the output list and does not group all these columns. Therefore, the query may return an incorrect result.
Note An example of a physical operator is the Stream Aggregate operator.
For example, the query optimizer generates a GROUP BY ColA, ColB clause internally against the following table:
Cumulative update information
SQL Server 2008 R2The fix for this issue was first released in Cumulative Update 5. For more information about how to obtain this cumulative update package for SQL Server 2008 R2, click the following article number to view the article in the Microsoft Knowledge Base:
ID Bài viết: 2428310 - Xem lại Lần cuối: 31-12-2010 - Bản sửa đổi: 1