Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

group by CUBE precision problem

Status
Not open for further replies.

irvina

Programmer
Jan 3, 2001
5
0
0
CH
I have a problem with the CUBE functionality. Is there a way of specifying the precision of the end result?

Below is my query and the results. It all looks good until the last line which is the grand total line. The value reads xxx.04 but should in fact be xxx.035 !

Can anyone help me find a solution?

Thanks for your help.


select xaxis, yaxis, sum(ratio*yellow)
from wol_v_arrc_position_matrix where
matrix = 3
AND refcurrency = 'CHF'
AND id = 101285360
GROUP BY cube(xaxis, yaxis);

XAXIS YAXIS SUM(RATIO*YELLOW)
---------- ---------- -------------------------
1 2 138765
1 5 226800
1 6 576680
1 9 248160
1 NULL 1190405
3 2 114910.84
3 8 50844.69
3 9 54493.65
3 NULL 220249.18
4 7 10322.4275
4 8 10322.4275
4 NULL 20644.855
NULL 2 253675.84
NULL 5 226800
NULL 6 576680
NULL 7 10322.4275
NULL 8 61167.1175
NULL 9 302653.65
NULL NULL 1431299.04
 
Try using

column Total format 9999999.99

select xaxis, yaxis, sum(ratio*yellow) Total
............


Talent is what you possess;
genius is what possesses you

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top