开发者

write a SP or function that takes the parameter (Day,frequency, and date) and calculates the nexttransaction Date?

开发者 https://www.devze.com 2023-03-07 14:41 出处:网络
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

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?

0

精彩评论

暂无评论...
验证码 换一张
取 消