>>>If you have NULLs in any of your fields this query will return different result than
>>>
>>> SELECT * FROM case4 WHERE
>>> (@LastSearch IS NULL OR patientlast LIKE @LastSearch+'%') AND
>>>etc.
>>So far my testing has given me what I'm looking for. Not planning on using OR logic. Is it the OR logic that you see as the problem?
>
>Using OR logic is better because your current version will not return records with NULLs in them - unless it is intentional.
Thanks. I think I see your point. But I think I'll stand pat with this version because I really don't have any records with NULL last names and if there are any I can't use them anyway.