• J Sitz (3/11/2008)


    I already had this function created for another application, and thought it would be easier than looking up the holiday dates in the future. I suppose if you think it would be a lot better, I could use this function to populate a table with the dates. This Calendar table that you are referring to, is it just a table that I enter in the dates, or is it a feature in SQL?

    It's not a built in feature... here's an article that tells the how and why...

    http://sqlserver2000.databases.aspfaq.com/why-should-i-consider-using-an-auxiliary-calendar-table.html

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