Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Code to find if a holiday falls on or between two dates

$
0
0

I have a table 'OrderMast' in which two of the columns are date/time; StartDate and EndDate.

I am tasked to create a view 'vOrderMast' to include the StartDate and EndDate fields, and next to them an IsHoliday? field which returns 1 if a company holiday date falls on or between the StartDate and EndDate, and if not, returns 0). The list of company holiday dates is in another table 'Holidays'.

Please what is the code to accomplish this?


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>