Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 05 Dec 2006 @ 13:58:25 GMT


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


Subj:   Re: Handling 21 digits in Teradata
 
From:   Geoffrey Rommel

  Why don't you store it as a varchar and then do a CAST for your computations?  


When cast, a variable has to be cast into a specific data type -- float, for instance -- so this will have the same problems that the original poster mentioned.

I've never faced this situation myself, but it seems to me that storing the numbers in two separate columns is the only solution. If you split it into dec(4) and dec(18,2), you will only need two extra bytes, but if you need to sum these columns dec(11) and dec(11,2) might be a better choice. A UDF to combine the fields and return a formatted number would be helpful.



     
  <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