• WayneS (9/15/2010)


    1. Change "Today" to "GetDate()".

    2. In your example, you want the date range to end on 9/14/2010. I assume this is a typo, and should be 9/14/2009?

    I've got the sneaky feeling that this is going to be for an SSRS report which would explain "Today" I think...

    Anyway, I agree... the op needs to clarify what the date range should actually be.

    --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)