Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 20 Sep 2004 @ 13:28:37 GMT


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


Subj:   Re: Impact of changing MaxDecimal from 15 to 18
 
From:   Dempsey, Mike

First of all 'Numeric' is simply a synonym for 'Decimal' so it makes no difference which of these you use.

If you wish to continue to use Decimal(15) you can avoid the overflow by casting the column to Decimal(18) during the select:

     select sum(cast(MyDec as decimal(18))) from ...

The max value that can be stored in Decimal(15) is 999999999999999

The max value that can be stored in Decimal(18) is 999999999999999999

Also note that many query tools can not handle numeric values with more than 15 digits. In SQL Assistant/Queryman you must set an option in order to return values from Decimal(16) [or above] accurately.

Unfortunately this forces the application to return the values as strings, so with this option set, you can not use any of the functions that work only on numeric values. (This applies to any column defined as Decimal(16) or highter - whether or not the actual values require more than 15 digits.)


Mike Dempsey
Teradata Client Tools



     
  <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