Numeric overflow computation error

Database

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 (1)
2 REPLIES

Re: Numeric overflow computation error

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.

Re: Numeric overflow computation error

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.