A SQL Server 2008 or SQL Server 2005 Analysis Services ROLAP query returns incorrect results

Extended support for SQL Server 2005 ended on April 12, 2016

If you are still running SQL Server 2005, you will no longer receive security updates and technical support. We recommend upgrading to SQL Server 2014 and Azure SQL Database to achieve breakthrough performance, maintain security and compliance, and optimize your data platform infrastructure. Learn more about the options for upgrading from SQL Server 2005 to a supported version here.

This article has been archived. It is offered "as is" and will no longer be updated.
When you run a ROLAP query that involves multiple parent/child dimensions and uses common table expressions (CTE), the ROLAP query can return incorrect results in some scenarios. 
This issue occurs when the following conditions are true:
  • The data source of the ROLAP partition is SQL Server 2005 or later versions, and that it supports common table expressions (CTE).
  • The partition is being accessed in ROLAP mode. This may be because one of the dimensions is in ROLAP storage mode, or the partition has ROLAP or HOLAP storage mode.
  • There are at least two parent/child dimensions referenced by the partition and one of them is bound to a named query and the other to a table in the DataSourceView.
When these conditions are met, this results in a mixture of CTEs and non-CTEs being used as part of the SQL query that is generated for the ROLAP query and then you would encounter the issue.

Service pack information

To resolve this problem, obtain the latest service pack for SQL Server 2008. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
968382 How to obtain the latest service pack for SQL Server 2008

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

This problem was first corrected in SQL Server 2008 Service Pack 2 for SQL Server 2008.
For more information about the drillthrough statement, visit the following Microsoft website:

Article ID: 2216472 - Last Review: 12/12/2015 09:12:41 - Revision: 2.0

Microsoft SQL Server 2008 Analysis Services, Microsoft SQL Server 2005 Analysis Services, Microsoft SQL Server 2008 Enterprise, Microsoft SQL Server 2008 Developer, Microsoft SQL Server 2008 Standard, Microsoft SQL Server 2005 Enterprise Edition, Microsoft SQL Server 2005 Developer Edition, Microsoft SQL Server 2005 Standard Edition

  • kbnosurvey kbarchive kbinfo atdownload kbbug kbexpertiseinter kbfix KB2216472