• SELECT COUNT(*) FROM HCD

          WHERE    HolidayDate BETWEEN @StartDate AND @EndDate

     

    I has been my experience that a "Calendar table" is BY FAR the most flexible solution with the minimum MAINTENANCE! The Calculation of holidays like that is Not a good thing when you have Shifts, Temp or Special Kind of employees. Besides that It does serve for multiple purposes which in my opinion DO outweight the so called "speed Difference" which again in my opinion is not that terrible and depending on what you are doing the amount of effort to accomplish some things varies widely.

    Again your UDF does have a purpose but I still think that the Calendar table should be the recomendation of choice and not the other way around.

    Thanks for the informative article,

    HTH

     


    * Noel