I have a list of numbers that add to 100: (16.55, 55.68, 27.77).
When I round these numbers using ROUND(), I get (17, 56, 28), which add to 101.
When I truncate these numbers using TRUNC(), I get (16, 55, 27), which add to 98.
My question is, is there some function I can use such that rounds the numbers so that the total is still 100? In this case, I would expect the result to be (16, 56, 28), the last two being rounded up because they are closer to the next higher integer than the first number is. Of course I would want the function to work with any group of numbers that add to 100.
Thanks in advance for your help.
2007-08-23
02:12:06
·
5 answers
·
asked by
nzseries1
4