I have this simple query:
SELECT POWER(( 1 + 3 / 100 ), ( 1 / 365 ))
According to MS SQL POWER(( 1 + 3 / 100 ), ( 1 / 365 )) = 1 when in fact it’s 1,000080986
How to get Power to return Decimal instead of int. This topic seems similar to Raising a decimal to a power of decimal? but that one touches c# and i need SQL. If there’s no other way i’ll use c# way.
Edited post to just show the problem without any specific information.
The precision is lost because your input values are all integers.
Try
If this doesn’t give sufficient precision, cast the inputs to
POWERas floats: