SQL Server does not provide such calculations out of the box. But the logic
for most financial functions is not so complicated and you can write your
code in T-SQL to implement those. Here is one example of PMT calculation
function I have used:
CREATE FUNCTION dbo.CalcPMT (
@principal DECIMAL(18, 2),
@payments INT,
@interest FLOAT)
RETURNS DECIMAL(18, 2)
AS
BEGIN
RETURN @principal /
(power(1 + @interest, @payments) - 1) *
(@interest * power(1 + @interest, @payments))
END
GO
SELECT dbo.CalcPMT(10000.00, 20, 0.10) AS pmt
GO
If you search Internet you will find more examples, here is another
reference:
http://www.sqljunkies.com/HowTo/FE605D6E-654A-4DBF-9FC3-976A411F7BF5.scuk
I believe the same financial function in Excel are available in the .NET
Framework libraries. You can write a CLR function to access and use those
functions. CLR may be a more efficient way to do it if performance is a
concern. Here is a reference to the .NET Library functions:
http://msdn2.microsoft.com/en-us/library/hyd90ysd(VS.80).aspx
Also, you should not have problems using the Excel functions in Access
reports. Just make sure you have checked in Tools->References the MS Excel
object library, and then you can use the formulas on the report, like
"=PPMT(...)".
HTH,
Plamen Ratchev
http://www.SQLStudio.com >> Stay informed about: Amortization Report