FIX: You may receive incorrect results when you run a Multidimensional Expressions (MDX) query and the WHERE clause and the SELECT clause in the query contain different attributes of the same dimension in SQL Server 2005 Analysis Services

Article translations Article translations
Article ID: 936968 - View products that this article applies to.
Bug #: 500001122 (SQL Hotfix)
Expand all | Collapse all

On This Page

SYMPTOMS

When you run a Multidimensional Expressions (MDX) query in Microsoft SQL Server 2005 Analysis Services, you may receive incorrect results. This problem occurs when the following clauses in the query contain different attributes of the same dimension:
  • WHERE
  • SELECT

CAUSE

This problem occurs because the attributes are incorrectly overwritten when you run the MDX query.

RESOLUTION

Cumulative update information

The fix for this issue was first released in Cumulative Update 2. For more information about how to obtain this cumulative update package for SQL Server 2005 Service Pack 2, click the following article number to view the article in the Microsoft Knowledge Base:
936305 Cumulative update package 2 for SQL Server 2005 Service Pack 2
Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2005 fix release. Microsoft recommends that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
937137 The SQL Server 2005 builds that were released after SQL Server 2005 Service Pack 2 was released
Microsoft SQL Server 2005 hotfixes are created for specific SQL Server service packs. You must apply a SQL Server 2005 Service Pack 2 hotfix to an installation of SQL Server 2005 Service Pack 2. By default, any hotfix that is provided in a SQL Server service pack is included in the next SQL Server service pack.

STATUS

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

MORE INFORMATION

Steps to reproduce the problem

  1. Open SQL Server Management Studio, and then connect to an instance of SQL Server 2005 Analysis Services.
  2. Create a new MDX query against the Adventure Works database.
  3. Run the following MDX query:
    SELECT [Measures].[Internet Sales Amount] ON COLUMNS,
       NON EMPTY { 
        {[Date].[Month of Year].&[1]}   //January
        }
        ON ROWS FROM 
    [Adventure Works]
    where   
    {
    [Date].[Date].&[184]    //Dec 31, 2001
    , 
    [Date].[Date].&[185]  //Jan 1, 2002
    }
    
The query returns NULL. However, the correct result should be the value for January 1, 2002.

Properties

Article ID: 936968 - Last Review: October 8, 2011 - Revision: 2.0
APPLIES TO
  • Microsoft SQL Server 2005 Analysis Services
Keywords: 
kbfix kbqfe KB936968

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com