Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Flexable Rate Recursion Expand / Collapse
Author
Message
Posted Thursday, October 14, 2010 8:16 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, July 7, 2014 7:51 AM
Points: 174, Visits: 439
Comments posted to this topic are about the item Flexable Rate Recursion
Post #1004868
Posted Friday, October 15, 2010 9:28 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, August 13, 2014 3:41 PM
Points: 100, Visits: 402
Perhaps I'm missing something, but couldn't this be solved with some math? That is, if I have a rate to be applied a certain number of times, then I use p*(r**n) (i.e. r raised to the n power), where p is the principal, r is the rate, and n is the number of times to apply that rate.
Post #1005299
Posted Friday, October 15, 2010 10:15 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Wednesday, February 6, 2013 6:12 PM
Points: 381, Visits: 185
Plus you spelled flexible incorrectly.
Post #1005339
Posted Friday, October 15, 2010 10:16 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, July 7, 2014 7:51 AM
Points: 174, Visits: 439
Greetings Ben,

Yes, you are correct. However, I did not know that algorithm so I could not apply it. Instead I came up with a different solution. Your way would definitely work faster too as it requires less steps to be applied, even if it was kept in the function so it could include the error checking.
Post #1005340
Posted Friday, October 15, 2010 10:19 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, July 7, 2014 7:51 AM
Points: 174, Visits: 439
Greetings Laura,

Yep! My bad.
Post #1005343
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse