Home Page for the TeradataForum
 
 

 

Archives of the TeradataForum





Message Posted: Wed, 20 Dec 2006 @ 12:49:40 GMT





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




Subj:   Additional zeroes in teradata
 
From:   Mohd Suhail



Consider the following query in oracle:

     select LTRIM(SUM(nvl(t1.salary,0))) from employee;

The result comes out to be

     13963.9
     13963
     0
     13963.93
     -13980

The data type of salary is number(13,2)

I converted the above query for teradata as:

     select coalesce(TRIM(cast(SUM(salary) AS DECIMAL (13,2)
        format '-(10)9.99')) ),'0') from employee;

The result is:

     13963.90
     13963.00
     0.00
     13963.93
     -13980.00

Though i dont want the additional zeroes to appear, it does come. Please help me out in this matter





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