PV function conversion to SQL

T

tdick

Does anyone know what the corresponding sql code woudl be of the
excel PV function -

In excel function PV the inputs are PV («rate», «nper», «pmt»,
«fv»,
«due») where rate = discount rate, nper = number of payments, pmt =
payment) other two are not required.


nper is allowed to be a number with decimals, not just an integer.


I am seeking the sql code which will replicate the above, including
nper with
decimals allowed. Thanks.
 
B

bpeltzer

If you're looking for a closed form of the equation, PV = pmt * (1 -
1/((1+rate)^nper)) / rate. Be sure that nper and rate are consistent (that
is, don't mixed an annual rate with the number of months. You'll typically
set rate to the ARP / 12 and npre to the number of years * 12).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top