CREATE FUNCTION CF_Finan_TemTea (@TEM FLOAT)
RETURNS FLOAT
AS
BEGIN

DECLARE @Mes FLOAT
DECLARE @TEA FLOAT
SET @TEM = @TEM / 100

SET @Mes = 365/30
SET @TEA = ((POWER( (1 + @TEM) , @Mes) ) - 1) * 100

RETURN @TEA
END
GO

CREATE FUNCTION CF_Finan_TemTna (@TEM FLOAT)
RETURNS FLOAT
AS
BEGIN
DECLARE @TNA FLOAT

SET @TNA = @TEM * 365 / 30 

RETURN @TNA
END
GO



CREATE FUNCTION CF_Finan_TnaTem (@TNA FLOAT)
RETURNS FLOAT
AS
BEGIN
DECLARE @TEM FLOAT

SET @TEM = @TNA * 30 / 365

RETURN @TEM
END
GO





