This content has been marked as final.
Show 1 reply
-
1. Re: How to calculate N root of X in query
shawkins Sep 20, 2016 9:15 PM (in response to ragava28)The power function expects a double and 1/1.89 is bigdecimal. Teiid treats the conversion of bigdecimal/numeric to double as potentially narrowing, which will depend on the exact value. In this case unfortunately a cast is needed -
SELECT POWER(27, cast(1/1.89 as double))
You can see there is slight difference in the values:
SELECT 1/cast(1.89 as double) = 1/1.89