Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL output formatting
"Ubiquitous" <weberm_at_polaris.net> wrote in message
news:c3pcln$olg$1_at_news.utelfla.com...
> I am attempting to produce a PL/SQL report that returns itemized line
> counts but am having difficulty in making the numbers line up right
> justified. I'd like it to look like this:
>
> 121 Records updated
> 74 AALF records updated
> 3 DICE records updated
> 44 TITLE records updated
> Update successfull!
>
> But I am getting this:
>
> 121 Records updated
> 74 AALF records updated
> 3 DICE records updated
> 44 TITLE records updated
> Update successfull!
>
> Apparently the leading spaces are being stripped and I'm not sure to to
> surpress it. If I display numeric data types it shows leading zeros and
> if I cast the values as character strings I get the above. Is there a
> way to "right justify" the numbers?
>
>
Hi,
You may want to look at format modifiers ('fm') within the TO_CHAR function. For example, TO_CHAR( num, 'fm000009' ).
Douglas Hawthorne Received on Tue Mar 23 2004 - 07:34:17 CST