Home Forums SQL Server 2008 T-SQL (SS2K8) Deprecated]Function call can be extracted from the WHERE clause to avoid unnecessary table scan. RE: Deprecated]Function call can be extracted from the WHERE clause to avoid unnecessary table scan.

  • Welsh Corgi (1/16/2014)


    Lowell (1/16/2014)


    dateadd is not deprecated.

    I run it through ubitsoft's T-SQL Analyzer and I get the following:

    SA0028 : [Deprecated]Function call can be extracted from the WHERE clause to avoid unnecessary table scan.

    I'm not sure why I got that error.

    Thanks.

    Must be a bug with ubitsoft's reporting because, I agree, DATEADD is not deprecated.

    Removal of functions wrapped around columns in the WHERE clause is, however, a great idea.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)