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: george lewycky <gelewyc_at_nyct.com>
Date: 30 Mar 2004 13:22:36 -0800
Message-ID: <68aecc05.0403301322.7a4a232@posting.google.com>


I encountered and suffered through all of this for weeks also.

How are you viewing the output ??
I suggest spooling the output to a *.txt file then opening & printing the file using TEXTPAD http://www.textpad.com/ especially if you need page breaks. PL/SQL handles page breaks differently.

I had wrapping and alignment problems until I used the "format wrap" that others instructed earlier

Also I suggest using CHAR instead of VARCHAR for alignment since CHAR is fixed length.

example:

set serveroutput on format wrap
set linesize 150
spool output.txt
execute xxxxxxxxxxxxxx
spool off

Good luck

George Lewycky

Richard Kuhler <noone_at_nowhere.com> wrote in message news:<9CZ9c.24851$Lq4.17037_at_twister.socal.rr.com>...
> Ubiquitous wrote:
>
> > Richard Kuhler <noone_at_nowhere.com> wrote:
> > : Mark C. Stock wrote:
>
> > :> you're experiencing sql*plus being over-zealous in stripping leading blanks
> > :> you will not see the same behavior in all other tools, for instance toad
> > :> in sql*plus, i believe you'll need to use a leading non-space to prevent
> > :> this behavior -- unless there's a setting that i've not yet run across ;-)
> > :
> > : This is causes by the word wrapping process in SQL*Plus. Switch to
> > : standard wrapping and it will work fine ...
> > :
> > : set serveroutput on size 1000000 format wrapped
> >
> > I use DBMS_OUTPUT.enable(1000000) because it complains about SET SERVEROUTPUT
> > when I invoke the PL/SQL script via a UNIX shell script. Is there an unlisted
> > parameter to what I'm using?
>
> No, the formatting is done on the SQL*Plus side so you'll have to change
> it there. However, there's no good reason it shouldn't work through a
> Unix shell script. I have tons of scripts that are run that way on
> Solaris, Linux and AIX using a variety of shells. If you'll post a
> small demonstration script and the exact error you're getting, maybe we
> can figure out what the problem is.
Received on Tue Mar 30 2004 - 15:22:36 CST

Original text of this message

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