Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem with number format

859228Dec 12 2011 — edited Dec 12 2011
Hello

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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 9 2012
Added on Dec 12 2011
3 comments
359 views