Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Space in the output
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