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

194 reads

Blogs

Daily Coping 18 Sep 2020

By

I started to add a daily coping tip to the SQLServerCentral newsletter and to...

Optimize for Unknown for Inline Table-Valued Functions

By

I had a curious performance issue today. An inline table-valued function (iTVF) was performing...

Daily Coping 17 Sep 2020

By

I started to add a daily coping tip to the SQLServerCentral newsletter and to...

Read the latest Blogs

Forums

SQL Query - FULL JOIN multiple tables but return NULL results

By glennyboy

Good day! Need help with my sql query code; first FULL JOIN "ILEtransfer" no...

Coping with a working life as an imposter

By Phil Factor

Comments posted to this topic are about the item Coping with a working life...

SQL Select with condition

By Dee Dee-422077

Hi, In my sql table,  there is a column which have string of text...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers