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

Home -> Community -> Usenet -> c.d.o.server -> Re: Space in the output

Re: Space in the output

From: Kenneth C Stahl <BlueSax_at_Unforgettable.com>
Date: Tue, 26 Oct 1999 13:03:47 -0400
Message-ID: <3815DEF3.4FF9285A@Unforgettable.com>


Erika Grondzakova wrote:
>
> Hello,
>
> Is it possible to force somehow Oracle in SQL*Plus to get output of the
> DBMS_OUTPUT.PUT_LINE command with the leading spaces?
>
> Following example will print the word hello from the beginning from the
> line:
>
> SQL> begin
> 2 dbms_output.put_line(' hello');
> 3 end;
> 4 /
> hello
>
> And I would like to display it with the leading spaces :
> hello
>
> Actually I need it in the file where I'm spooling the output.
>
> Thank you in advance,
>
> Erika

What I have done is prefixed each line with a period (.). That tricks dbms_output to not trim the spaces. After the output is written I then use sed to sweep through the output to replace the '.' with a blank. Works quite well. Received on Tue Oct 26 1999 - 12:03:47 CDT

Original text of this message

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