You are currently offline, waiting for your internet to reconnect

FIX: A query that references a view that uses UNION operator may return incorrect results

This article was previously published under Q326810
This article has been archived. It is offered "as is" and will no longer be updated.
Bug #: 361320 (SQL Server 8.0)
When you run a query, the query may return results that are not correct if all the following conditions are true:
  • The query execution plan contains the Distinct Sort logical operator, and the Distinct Sort logical operator is on a Join logical operator.
  • The Join logical operator is on a Rank logical operator.
This problem may occur if the query references a view that uses the Union logical operator to perform a join between two or more tables.

Service pack information

To resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000 Analysis Services. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
290211 INF: How to obtain the latest SQL Server 2000 service pack

Hotfix information

The English version of this hotfix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
   Date      Time   Version    Size    File name   --------------------------------------------------   29-Jul-02 15:38  8.00.665 7,462,996 Sqlservr.exe				
Note Because of file dependencies, the most recent hotfix or feature that contains these files may also contain additional files.
To work around the problem, perform one of the following actions:
  • Re-create the underlying view to use the DISTINCT operator and the UNION ALL operator instead of the UNION operator in the view definition query.
  • Force the query execution plan to use a LOOP JOIN hint, a MERGE JOIN hint, or a HASH JOIN hint by using the OPTION(Join Type Hint) clause in the query.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section of this article.
This problem was first corrected in SQL Server 2000 Analysis Services Service Pack 3.

Article ID: 326810 - Last Review: 01/17/2015 05:53:08 - Revision: 3.2

Microsoft SQL Server 2000 Standard Edition

  • kbnosurvey kbarchive kbhotfixserver kbqfe kbsqlserv2000sp3fix kbdatabase kbview kbquery kbbug kbfix KB326810