Archives of the TeradataForum
Message Posted: Sun, 15 Feb 2015 @ 15:20:54 GMT
Power and ** function are results float data typed values.
## power(x, y): upon working function CAST to integer data type, it results correct.
## x**y : upon working function CAST to integer, it is resulting incorrect.
select cast(power(10,4) as integer); res: 10000 select cast((10**4) as integer); res: 9999
however it works when we use double cast through decimal,
select cast(cast((10**4) as decimal(20,0))as integer); res: 10000
Could anyone help me understand why this is happening ,is there any implicit conversion going on here.
GANGA SANDEEP KUMAR
|Copyright 2016 - All Rights Reserved|
|Last Modified: 28 Jun 2020|