FIX: SELECT DISTINCT from Table with LEFT JOIN of View Causes Error Messages or Client Application May Stop Responding (308547)
The information in this article applies to:
- Microsoft SQL Server 2000 (all editions)
This article was previously published under Q308547
BUG #: 355640 (SHILOH_BUGS)
SYMPTOMS
A SELECT DISTINCT query that joins a table to a view through an outer join may:
- Cause error messages or exceptions at the client.
- Produce the appearance of incorrect results.
- Cause the client application to stop responding (hang).
The error messages that may occur include:
Bad token from SQL Server: Datastream processing out of sync.
Unknown token received from SQL Server
Protocol error in TDS stream
Invalid cursor state
Function sequence error
RESOLUTIONTo resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000. 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
HotfixNOTE: The following hotfix was created prior to Microsoft SQL Server 2000 Service Pack 2.
The English version of this fix should have the following file attributes or later:
Date Version Platform
-----------------------------------
Sqlservr.exe 8.00.452 i386
NOTE: Due to file dependencies, the most recent hotfix or feature that contains the preceding files may also contain additional files.
WORKAROUND
To work around this problem either:
- Remove the DISTINCT keyword from the query, or select from the base table instead of from a view that references the table.
-or-
- Change the nullability of the columns in the base table that are selected by the query (the problem arises when the nullability of column data differs from the metadata reported to the client).
STATUSMicrosoft has confirmed that this is a problem in Microsoft SQL Server 2000. This problem was first corrected in Microsoft SQL Server 2000 Service Pack 2.
Modification Type: | Minor | Last Reviewed: | 9/26/2005 |
---|
Keywords: | kbHotfixServer kbQFE kbbug kbfix kbSQLServ2000preSP2Fix KB308547 |
---|
|