![]() |
|
Archives of the TeradataForumMessage Posted: Wed, 20 Dec 2006 @ 12:49:40 GMT
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
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||