SQL Server incorrectly returns rows that have a NULL value when you try to filter non-Unicode data columns for records from a table (911848)
The information in this article applies to:
- Microsoft SQL Server 2000 Developer Edition
- Microsoft SQL Server 2000 Enterprise Edition
- Microsoft SQL Server 2000 Personal Edition
- Microsoft SQL Server 2000 Standard Edition
Bug #: 474683 (SQL Server 8.0)
SYMPTOMSConsider the following scenario. You try to filter non-Unicode data columns for records
from a table in Microsoft SQL Server 2000. You use the NOT LIKE clause in a Transact-SQL query statement. You use the "%" wildcard character in the search pattern. In this scenario, SQL Server
incorrectly returns rows that have a NULL value for the column.
Note You do not experience this problem when you use Unicode data.
WORKAROUNDTo work around this problem, you must explicitly specify the IS NOT NULL clause in the Transact-SQL query statement. For example, you may use the following query: select * from test where C2 not like '%' and C2 IS NOT NULL
Modification Type: | Major | Last Reviewed: | 1/20/2006 |
---|
Keywords: | kbtshoot kbprb KB911848 kbAudDeveloper kbAudITPRO |
---|
|