• I have had good luck using the OR statement instead of LIKE. Often, I find that the LIKE statement doesn't always like to read the index.

    So, when I do this, the statement looks like:

    select * from table1

    where (@first_name IS NULL or first_name = @first_name)

    and (@last_name IS NULL or last_name = @last_name) etc...

    I've found really great performance overall in the majority of cases. Of course, this doesn't handle if you really wanted the LIKE statement, but often I am looking for an exact match.

    Todd


    Todd