• Thanks much. I imagine most people have written some version of this with the columns they most need, but a single script collecting them all is great. I've got my own with a handful of our holidays and some other stuff.

    Because this script is a one-time run and doesn't need to be efficient, those wanting is_businessday can do what I do and just add it at the end, calculating it based on is_weekday and a to-be-added holiday column... which would probably require customization for most places. Celko posted awesome resources, my own I'm-too-lazy-this-is-good-enough code for some standard U.S. holidays was was:

    [Holiday] AS

    CASE

    WHEN MONTH(date)=1 AND DAY(date)=1 THEN 'New Years Day'

    WHEN MONTH(date)=5 AND DatePart(weekday, DateAdd(day,@@DATEFIRST,[date]))=2 AND DAY(date) BETWEEN 25 AND 31 THEN 'Memorial Day'

    WHEN MONTH(date)=7 AND DAY(date)=4 THEN 'Independence Day'

    WHEN MONTH(date)=9 AND DatePart(weekday, DateAdd(day,@@DATEFIRST,[date]))=2 AND DAY(date) BETWEEN 1 AND 7 THEN 'Labor Day'

    WHEN MONTH(date)=11 AND DatePart(weekday, DateAdd(day,@@DATEFIRST,[date]))=5 AND DAY(date) BETWEEN 22 and 28 THEN 'Thanksgiving'

    WHEN MONTH(date)=12 AND DAY(date)=25 THEN 'Christmas Eve'

    WHEN MONTH(date)=12 AND DAY(date)=26 THEN 'Christmas Day'

    ELSE '' -- or NULL depending on your preference

    END /* CASE */,