FIX: IN Condition with More Than 15 Values May FailLast reviewed: April 30, 1997Article ID: Q133407 |
The information in this article applies to:
SYMPTOMSIf the IN conditional expression of the WHERE clause contains more then 15 constants and is being tested against an INT NULL column, then it will return no rows even if there are qualifying rows.
WORKAROUNDUse an INT NOT NULL column to do these qualifications.
STATUSMicrosoft has confirmed this to be a problem in Microsoft SQL Server version 6.0. This problem was corrected in Service Pack 1 for SQL Server version 6.0. For more information, contact your primary support provider.
MORE INFORMATIONThe following commands demonstrate the problem:
create table t1(c1 int null) go insert t1 values( 1) insert t1 values( 2) insert t1 values( 3) insert t1 values( 4) insert t1 values( 5) go print "This SELECT fails" go select c1 from t1 where c1 in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16) go print "This SELECT works" go select c1 from t1 where c1 in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15) go |
Additional query words: sql6 Windows NT
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |