• Yes that could in some cases be the most efficient means of getting the script to run properly.

    But...that is not always the case.

    You really can't determine that until you fully analyze the execution plans.

    Your date criteria might pull in 20,000 records but the @CoCode only needs to look at 200 records.

    Then if you apply those criteria together you might be down to 111 records. It may be many times more efficient to process the string related clause first and then try to narrow down the dates.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events