• Two comments:

    1. If you're going to store dates in a varchar, at least store it in YYYYMMDD format.

    2. Implicit conversions can also cause poor performing queries. Say you have a six-digit char column, zero-prefilled so that you have data like "001843". If you search for 1843, it will find the match, but it will also convert all of that column to an int. Even if you have an index on that column, it now won't be used.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2