IsWorkday UDF without a table

While the other methods for calculating holidays ect use a table to store the holidays, this inline UDF goes the opposite route, by returning 1 if the given date is a weekday that also does not fall on a number of holidays.  Examples shown allow for easy extension to other holidays as deemed necessary.

2004-05-02

191 reads

Blogs

How I passed the 70-761 certification exam

By

FUN FACT: I have been a Microsoft Certified Professional for SQL Server for over...

Azure Storage tips

By

As a followup to my blog post Azure Data Lake Store Gen2 is GA,...

Managing Agent Jobs on Availability Group Servers

By

As always, the scripts in this post can also be found on our Git...

Read the latest Blogs

Forums

how about explaining your RegEx logic?

By jeffrey yao

RegEx is always tough to digest (without referring to document), so it would be...

Relatively easy query assistance - datediff

By morkal

Hi all, I have a question since I'm new to SQL: I have a...

Mirroring alerts

By kilein

Hi, In one of our customers the database mirroring was already configured. After long...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers