I have been struggling to write a SP or function. The requirement is to compute the NextTransactionDate based on the input parameters passed - Day (Monday, Tuesday, etc), Frequency (Monthly, Bi-Weekly, Semi-Monthly,Weekly), and Date( Date where you would apply the logic).
Example, Let's say, you pass Day = Friday, Frequency as Bi-Weekly and Date=05/05/2011. The output should be the friday (day) 2 weeks (Bi-Weekly) from the Date (state) so In this example, M开发者_高级运维ay 20, 2011. For Monthly, it should be end of the month(business day). Appreciate your help if you already have such a SP.
I think you've gotten your answer already :) How to get NextDayofWeek if you pass the date?
精彩评论