Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Wed, 16 Jan 2013 @ 22:46:14 GMT

  <Prev Next>   <<First <Prev Next> Last>>  

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


     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.

  <Prev Next>   <<First <Prev Next> Last>>  
  Top Home Privacy Feedback  
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 24 Jul 2020