PV function conversion to SQL
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).
" wrote:
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.
|