SQL Server EFFECT Function
Updated 2023-10-10 22:21:02.297000
Description
Use the scalar function EFFECT to calculate the effective annual interest rate.
Syntax
SELECT [westclintech].[wct].[EFFECT] (
<@Nominal_rate, float,>
,<@Npery, int,>)
Arguments
@Nominal_rate
the stated rate of interest. @Nominal_rate is an expression of type float or of a type that can be implicitly converted to float.
@Npery
the number of times per year that @Nominal_rate is paid. @Npery is an expression of type float or of a type that can be implicitly converted to float.
Return Type
float
Remarks
@Npery is truncated to an integer.
If @Nominal_rate <= 0 or if @Npery <= 0 then EFFECT returns an error.
EFFECT is calculated using the following formula:
EFFECT = ((1+@Nominal_rate/@Npery)^@Npery)-1
Examples
SELECT wct.EFFECT(0.04, 12);
Here is the result set.
| column 1 |
|---|
| 0.0407415429197906 |