Re: SQL*Plus - NO RECORDS FOUND

From: Ian Dixon <idixon_at_syntaxis.ukmail.net>
Date: 16 Mar 94 20:24:08 GMT
Message-ID: <XuRaJc1w165w_at_syntaxis.ukmail.net>


moswald_at_netserv.unmc.edu (Mike Oswald) writes:

> Does anyone remember how to get a title to print even if there are no
> records found?

I will often use something like this:

  select a,b,c,d
  from table_A
  union
  select null,

         'End of Report',
		 null,
		 null

  from dual
  order by 1

  /

It will always give the 'End of Report' line, which I like to get, but it also gives the titles if no data is selected in the first part.

Regards

Ian


Ian Dixon                      |  Email : idixon_at_syntaxis.ukmail.net    |
Independent Oracle Consultant  |  Tel   : +44 (0)734 478092             |
Reading, England               |                                        |
Received on Wed Mar 16 1994 - 21:24:08 CET

Original text of this message