summary report with a lot of decimal places

To discuss Oracle Forms & Reports related technical issues.
Post Reply
patelwork
Posts: 18
Joined: Thu Jan 25, 2007 1:55 am
Location: Pakistan

summary report with a lot of decimal places

Post by patelwork »

hi,

i have build a detail report with some amounts, the amounts have a lot of decimal places . eg

fld1 fld2
---- ------------------
a1 258.3698745112547
a2 123.369258171254
a3 32145.2314587923
b1 25987.2
b2 12457.5
b3 1144.59

and so on...

at last the summ of these amount is showing...
its ok...

now i build another report with the same data but its a summary report

select fld1, sum(decode(substr(fld1,1,1),'a',fld2,0) - sum(decode(substr(fld1,1,1),'b',fld2,0)
from mytable.
group by fld1

the summ of amount of the above fileds are not match to the details report..

i think some thing is wrong with a lot of decimal
i have tried a ... round function in diff places but the results is still same

please help me out.

thanks
ahmadbilal
Posts: 615
Joined: Mon Sep 18, 2006 1:32 am
Location: United Arab Emirates
Contact:

Post by ahmadbilal »

use Round function in both reports it Returns the left number rounded to right number places of the decimal point

for example
select ROUND(1.57) from dual;

ROUND(1.57)
-----------
2

Or use TRUNCATE function
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests