Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

Error while casting to decimal! - forum topic by barani_sachin

$
0
0

Hi All,
I am 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.a25
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;

 
Can you guys pls giv u r thoughts on whats going wrong??

Forums: 

Viewing all articles
Browse latest Browse all 27759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>