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

Home -> Community -> Mailing Lists -> Oracle-L -> FW: force a title to print in sqlplus-Thanks all!

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

From: Ruth Gramolini <rgramolini_at_tax.state.vt.us>
Date: Fri, 13 May 2005 12:25:07 -0400
Message-ID: <00a901c557d8$533aebd0$8459000a@vttaxnet.tax.state.vt.us>

-----Original Message-----
From: Tom Carty [mailto:tcarty_at_tax.state.vt.us] 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_at_tax.state.vt.us]
> 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_at_gmail.com]
> Sent: Friday, May 13, 2005 9:45 AM
> To: rgramolini_at_tax.state.vt.us
> Cc: oracle-l
> Subject: Re: force a title to print in sqlplus
>
>
> On 5/13/05, Ruth Gramolini <rgramolini_at_tax.state.vt.us> 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.
>

--
http://www.freelists.org/webpage/oracle-l
Received on Fri May 13 2005 - 12:29:40 CDT

Original text of this message

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