All Forums Database
deva_048 8 posts Joined 04/12
14 Dec 2013
Numeric overflow computation error

Numeric overflow computation error
Max (col1) = 11478000.0000
select cast (max(col1)*123.000*12300.00 as decimal( 15,5 )) from table1
Also if we do normal select also not working
select (11478000.0000*123.000*12300.00 )
Please help me on this
 

Tags:
Qaisar Kiani 337 posts Joined 11/05
14 Dec 2013

May be you need to adjust the scale and precision dependin. You can refer the following article...
 
http://developer.teradata.com/tools/articles/how-many-digits-in-a-decimal
 
"SQL Reference: Data Types and Literals" book could have more details.

Qaisar Kiani 337 posts Joined 11/05
14 Dec 2013

BTW you are multiplying DECIMAL(8,4) * DECIMAL(3,3) * DECIMAL(5,2). So I think your result should be DECIMAL(16,9) or something like that.
MAXDECIMAL flag in DBSControl also controls the maximum number of digits in a DECIMAL result for an expression. It could be 15 or 18, so if this is 15 then probably your computation won't be successfull.

You must sign in to leave a comment.