Article ID: 281338 - View products that this article applies to.
This article was previously published under Q281338
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 26147 (SQLBUG_70)
Select distinct does not eliminate duplicate null values that are contained in bit datatype columns.
Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 3 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
274799For more information, contact your primary support provider.
(http://support.microsoft.com/kb/274799/ )INF: How to Obtain Service Pack 3 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0
Use the code that follows to reproduce this behavior:
The preceding code returns this result:
Note that the code correctly eliminates the duplicate value 1 but incorrectly returns duplicate null values. The correct resultset is:
bar ---- NULL NULL 1
bar ---- NULL 1
Contact us for more help
Connect with Answer Desk for expert help.