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!

How to display a number as a percentage?

434964Jan 14 2005 — edited Jan 14 2005
We have a column that we want to display as a percentage. Is there a format mask that we can use to do this? We have not found one that works. We also considered concatenating the '%' sign to our column in the sql expression. So the column for the field called pct_available would look like this:
pct_available ||'%',

Unfortunately, we cannot do this because we are using dynamic sql where each line is terminated by the "single quote" character as shown in the snippet of code below. So if we try to format the column by concatening the % sign our single quote terminates the line prematurely and the query cannot be parsed.

Bottom line: How does everyone display percentages in HTMLDB?

declare
q varchar2(4000);
begin
q:=' select t2.region_name, ';
q:=q||' t2.subregion_name, ';
q:=q||' t1.pct_available, ';
q:=q||' t2.orders ';

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 11 2005
Added on Jan 14 2005
1 comment
722 views