FW: force a title to print in sqlplus-Thanks all!

  • From: "Ruth Gramolini" <rgramolini@xxxxxxxxxxxxxxx>
  • To: "oracle-l" <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 13 May 2005 12:25:07 -0400


-----Original Message-----
From: Tom Carty [mailto:tcarty@xxxxxxxxxxxxxxx]
Sent: Friday, May 13, 2005 10:39 AM
To: Ruth Gramolini
Subject: RE: force a title to print in sqlplus


Thanks Ruth.

I'm going to use a variation of Stephen Booth's solution.  As is his method
has
the flaw that when there are real rows it causes a blank line to appear as
the
first data line and also it causes count of rows selected stated by sql to
be
off by one because its including the blank row.  So what I did was to just
use
Stephen's SELECT as a separate query (not a union) BEFORE my real SELECT.
It
results in a TTITLE followed by "no rows selected".  The only thing missing
is
the heading line which I can live without.

Tom

> -----Original Message-----
> From: Ruth Gramolini [mailto:rgramolini@xxxxxxxxxxxxxxx]
> Sent: Friday, May 13, 2005 10:03 AM
> To: Tom Carty
> Subject: FW: force a title to print in sqlplus
>
>
>
>
> -----Original Message-----
> From: stephen booth [mailto:stephenbooth.uk@xxxxxxxxx]
> Sent: Friday, May 13, 2005 9:45 AM
> To: rgramolini@xxxxxxxxxxxxxxx
> Cc: oracle-l
> Subject: Re: force a title to print in sqlplus
>
>
> On 5/13/05, Ruth Gramolini <rgramolini@xxxxxxxxxxxxxxx> wrote:
> > Good morning all,
> > One of my developers wants to know if there is a way to force the ttitle
> to
> > print on a report even if no rows are found.  Does anyone know how to do
> > this?
>
> The thing that immediately springs to mind is to add:
>
> union
> select ' ' " " from dual
>
>
> to the end of your queries.  This will ensure that you get at least
> one (blank) row returned.
>
> Stephen
>
>
>
> --
> It's better to ask a silly question than to make a silly assumption.
>

--
//www.freelists.org/webpage/oracle-l

Other related posts:

  • » FW: force a title to print in sqlplus-Thanks all!