Archives of the TeradataForum
Message Posted: Wed, 16 Jan 2013 @ 22:46:14 GMT
On my Teradata (TD 14)
Select cast (20.685 as decimal(10,2)) gives 20.685
Select cast (20.6851 as decimal(10,2)) gives 20.69
Select cast (20.695 as decimal(10,2)) gives 20.70
which I believe is correct behaviour for rounding as defined in mathematics.
Nevertheless there is a dbscontrol setting (RoundHalfwayMagUp) which can be adjusted to change the behaviour of rounding of decimals *****BE CAREFUL**** this is a system wide setting - it affects all queries for all users.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 24 Jul 2020|