Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Tue, 28 Sep 2004 @ 08:50:09 GMT

  <Prev Next>  
Next> Last>>  

Subj:   Loss of decimal precision values
From:   Manish Kumar Maurya

Hi All,

i am facing this problem of loss of decimal precsion values when i fire the sql:

     x/y *100 from table1;

i get a value to be 98 but when i cast it with decimal(16,2) ,

     select x/(y decimal(16,2)) * 100 from table1;

i get a value 98.00

then again if i increase the precision in the cast statment to be decimal(16,4) i get a value 98.2400

     select x/(y decimal(16,4)) * 100 from table1;

why is this happening , is there a work around which can get me the value to be 98.24 with decimal(16,2) as the report which uses this column only shows 2 decimal places, currently the value displayed in the column is 98.00, which is not the desired result.

thanx in advance


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