Home Page for the TeradataForum
 
 

 

Archives of the TeradataForum





Message Posted: Fri, 18 Apr 2008 @ 11:21:59 GMT





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




Subj:   DECIMAL(19,2) to DECIMAL(18,2) type casting
 
From:   Lilian.Ramona



Hi,

When I do the following:

     AVG(TOT_CNT (DECIMAL(19,2)))

The result I’m getting is 325973967515935.00

But, when I do the following:

     AVG(TOT_CNT (DECIMAL(19,2)))  (DECIMAL(18,2))

The result is 325973967515935.25

The data type of TOT_CNT is DECIMAL(18,2)

* Can some one tell me what is exactly happening when I do AVG (TOT_CNT (DECIMAL (19,2))) (DECIMAL(18,2)) ?

* How is 325973967515935.00 changed to 325973967515935.25?

* Why is there a truncation when I do AVG(TOT_CNT (DECIMAL(19,2))) ?


Thanks in advance.





     
  <Prev Next>  
<<First
<Prev
Next> Last>>  
 
 
 
 
 
 
 
 
  
 
  Top Home Join Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky 
Last Modified: 26 Jul 2010