• This is a pretty poor example of how to do this imho.

    If you wish to do the dreaded "like" you should have two sets of params, one set when you know the whole first / last name and one for partial first / last names.

    This way indexes get used properly and you dont have to use like when you know the whole names etc

    Coalesce should also be used to to remove the reams of or / and where clauses