How can I create a stored procedure that accepts a start and end date? (Eg 1 April - 30 April
1) Get business days including Saturday X (a value). + 2) Get the holidays x (a value)
and return the total.
I'm new to this, I think it will be a tsql function, hmm.
Any help would be appreciated.
Thanks
The simplest solution to this problem is to create a calendar table in which every There is a price for the day that you may want to consider, then you can add columns which show that this is a business day or holiday. With it, the problem gets thinner:
If you want to count the days, you can do the following:
< Pre> select par (when IsBusinessDay = 1 then 1 other zero end) as the BusinessDayCount, the calendar where calendar as the holiday code for the yoga (case when iHolID = 1 then 1 es 0 and calendar). [Date] between '2010-04-01' and '2010-04-30'
Comments
Post a Comment