Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Numeric overflow occurred during computation? - response (9) by dnoeth

$
0
0

cast(400.000000000 * 100000000  as decimal(38,8))
--> multiplication first, maximum number of digits for the result of the calculationbased on MAXDECIMAL: 18 (fails ), then CAST
 
cast(400.000000000 as decimal(38,8)) * 100000000
--> CAST first to 38 digits, then multiplication (success)
Same for any cast to a decimal with sufficient precision like decimal(18,2)

Dieter
 
 


Viewing all articles
Browse latest Browse all 14773

Trending Articles