Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL output formatting

Re: PL/SQL output formatting

From: Douglas Hawthorne <douglashawthorne_at_yahoo.com.au>
Date: Tue, 23 Mar 2004 13:34:17 GMT
Message-ID: <t1X7c.121434$Wa.42034@news-server.bigpond.net.au>


"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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US