how would you write this formula in sql
This is what i have
@FinalAmount = (@P * (1 + dbo.[IntRate](@N))^@N)
This is the error
Msg 402, Level 16, State 1, Procedure FinalAmount, Line 7
The data types decimal and int are incompatible in the '^' operator.
What I am trying to do is calculate the compound interest