Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQLPlus formatting question
"Holger Baer" <holger.baer_at_science-computing.de> wrote in message
news:3E9D0433.3000400_at_science-computing.de...
> Ed Stevens wrote:
> > Platform: Oracle 8.1.7
> >
> > I have a query that typically returns less than 5 rows. I'd like to
> > force a line break after every column, so that the data is listed like
> > this:
> >
> > Col1: value
> > Col2: value
> > etc.
> >
> > so put together a query like this:
> >
> > set echo off
> > set heading off
> >
> > column empno newline
> > column lastname newline
> > column firstname newline
> > (..snip..)
Even though I think Frank's idea is the "hidden" line you're after, you could also use the fold_after x command... ex-
column empno fold_after 1
There's also a fold_before, which performs the same function as newline. Fold_after puts a carriage return -after- a column prints, fold_before puts a carriage return -before- a column prints, just like newline. I remember writing a query in which fold_before x returned strange column prints, so I used fold_after. I believe with your query (using newline), you're getting a blank line as the very first line in the query?
It used to be in Oracle 7 that you needed an integer after the fold_after and fold_before commands. It didn't matter what the integer was (1 or 999), it was for "possible" future use by Oracle to determine how many blank lines you wanted before/after a column, but it -had- to be there. Not sure if it's required anymore or not; the Oracle 9i page I looked at didn't mention an integer value coming after fold_after or fold_before.
-Thomas Received on Thu Apr 17 2003 - 18:07:52 CDT
![]() |
![]() |