Re: SQL*PLUS ttitle settings

From: Ian Dixon <idixon_at_uidixon.infocom.co.uk>
Date: 29 Sep 93 21:05:13 GMT
Message-ID: <JDjqsAvBBh107h_at_uidixon.uucp>


In <1993Sep29.114920.119492_at_embl-heidelberg.de> hazledine_at_embl-heidelberg.de writes:
>ebaril_at_devo.ersys.edmonton.ab.ca (Evalyn Baril) writes:
 

>> Does anyone know if there is any switch that can be set in order to have
>> the title on the report print even when there are "no rows selected".
>> The users really need to know which reports these are!
 

>I don't know if and how you could force a page title, but depending on the
>structure of your report you could use this trick to get what you want: use the
>UNION operator together with a SELECT FROM DUAL to retrieve a text constant when
>there's no real data to be got.

[Stuff deleted]

>Depending on the columns in the report, and the time taken to execute the query,
>this might be difficult or impossible to do :-(

You dont need a condition on the second select if your users will accept some fixed text at the end of every report. I've used something like the following:

 column some_text format a30 head 'A text column'

  select column_1 some_text,

         column_2,
         .
         column_n

  from A_TABLE
  where COLUMN_1 = 'A Text String'
 UNION
  select '**** End of Report ****' some_text,
         NULL,
         .
         NULL

  from DUAL

Obviously this relies on the report having a suitable character column to use.

Hope this helps

Ian

-- 
--
Ian Dixon                       Email : idixon_at_infocom.co.uk
Reading, England
Received on Wed Sep 29 1993 - 22:05:13 CET

Original text of this message