" They aren't false. They are NULL"Quite right! I meant false in the sense of "They won't be selected"."if i put(in preview section) just in parameter Col2 = %AA% and col1=%%in the result i get the line with AA plusline 3 (3 NULL xx)"You do? I don't DECLARE @Temp TABLE( Col1 VARCHAR(10), Col2 VARCHAR(10), Col3 VARCHAR(10))INSERT INTO @TempSELECT '1', 'AA', 'zz' UNION ALLSELECT '2', 'BB', 'yy' UNION ALLSELECT '3', NULL, 'xx'select * from @Temp WHERE col1 LIKE '%%' AND col2 LIKE '%AA%'Gives me: Col2 Col3 ---------- ---------- ---------- 1 AA zz
whereas if I use the syntax I recommended earlier:select * from @Temp WHERE col1 LIKE '%%' AND (col2 LIKE '%AA%' OR col2 IS NULL)Gives me:Col1 Col2 Col3 ---------- ---------- ---------- 1 AA zz3 NULL xx