Problem with number format
859228Dec 12 2011 — edited Dec 12 2011Hello
I have a problem with a query, where I calculate a percentage. When the percentage is 0.XX Apex always cuts off the leading zero.
Example report:
revenue target revenue_achieved percent
100 10 1 %
200 1 .50%
100 0.1 .10%
Thist is how it should look like:
revenue target revenue_achieved percent
100 10 1 %
200 1 0.50%
100 0.1 0.10%
This is is an extract of my query:
select revenue_target,
revenue_achieved,
case
when revenue_target = 0 then '- %'
else round((revenue_achieved/ revenue_target) * 100, 2) || ' %'
end percent
from ...
Anybody got an idea why Apex cuts off the zero. I tried several ways to change the display or the query. Unfortunateley nothing worked.
Thanks for reading this post,
Felix