Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 17 Jun 2004 @ 15:54:33 GMT


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


Subj:   Re: Decimal 18 Precision and Numeric Overflow
 
From:   Victor Sokovin

  I have a division which results in 18 decimal places. The numerator and denominator have only 2 decimal points so I cast any of the numerator/denominator to decimal(18,18) but it says numeric overflow when i give (18,17) it is giving the results. Is there any options in SQL Assistant or WINDDI where we can see the 18 decimal places. Is there any way where we can preserve all the 18 decimal places.  


The following seems to work for me:

     CREATE SET TABLE vs_tst1 ,NO FALLBACK ,
          NO BEFORE JOURNAL,
          NO AFTER JOURNAL
          (
           A DECIMAL(18,18) )
     PRIMARY INDEX ( A );


     insert into vs_tst1
     values(.111111111111111112) ;


     sel *
     from dev_temp.vs_tst1 ;

      A
      0.111111111111111112

The above is the output in my Assistant 6.1. To see all the digits go to Tools | Options and check the option "Display full accuracy for Decimal(16) and above", if you have it. Otherwise, try BTEQ.


Regards,

Victor



     
  <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: 15 Jun 2023