Archives of the TeradataForum
Message Posted: Wed, 16 Jan 2013 @ 22:46:14 GMT
Subj: | | Re: Teradata decimal roundoff issue |
|
From: | | McCall, Glenn David |
On my Teradata (TD 14)
Select cast (20.685 as decimal(10,2)) gives 20.685
Whereas:
Select cast (20.6851 as decimal(10,2)) gives 20.69
And
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.
|