>>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.
If it's not broken, fix it until it is.
My Blog