Forum Moderators: open
CREATE FUNCTION UDF_InterestCalculator (@P decimal(8,2),@DP decimal(8,2),@i decimal(8,2), @Y decimal(8,2))
RETURNS decimal(8,2) AS
BEGIN
DECLARE @Out as decimal(8,4)
SET @Out = ((@p - @dp) * @i / (12 * (1 - (1 + (@i / 12))^(-@y*12))))
RETURN @Out
END
When I try to save I get the following error:
Invalid operator for data type. Operator equals boolean XOR, type equals decimal