Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

Retrieving the next working day from the table by giving input value using function if ther are any consecutive holidays for one week

$
0
0

table result:

days        Type_of_day
2018-04-27friworkingday
2018-04-28satweekendholiday
2018-04-29      sunweekendholiday 
2018-04-30 monHoliday
2018-05-01 tuepublicholiday
2018-05-02 wedholiday
2018-05-03 thursholiday
2018-05-04 friholiday
2018-05-05 satweekendholiday
2018-05-06 sunweekendholiday
2018-05-07 monworkingday
2018-05-08 tueworkingday

my requirement:-


if i give any input value using function or storedprocedure then i want to get next working day from the table result.
suppose for example i give the input value to the function or storedprocedure as 2018-04-27 then  2018-05-07 is next working day 


Viewing all articles
Browse latest Browse all 7129

Trending Articles



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