Trying to cast a column into decimal but its failing with the error

sel cast(a25 as decimal(38,2)) from TempUpdate

SELECT Failed. 2617: Overflow occurred computing an expression involving TempUpdate. a 25
So it means the column is having larger value than an decimal can hold rite?

Having said that the below statement runs fine

sel cast(cast(a25 as varchar(100)) as decimal(38,2)) from TempUpdate

so is casting to number and integer

sel cast(a25 as integer) from TempUpdate;
sel cast(a25 as number) from TempUpdate;

Similar Posts