Re: SQL*PLUS ttitle settings
From: <hazledine_at_embl-heidelberg.de>
Date: 29 Sep 93 11:49:20 +0100
Message-ID: <1993Sep29.114920.119492_at_embl-heidelberg.de>
Received on Wed Sep 29 1993 - 11:49:20 CET
Date: 29 Sep 93 11:49:20 +0100
Message-ID: <1993Sep29.114920.119492_at_embl-heidelberg.de>
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!
Suppose you had a table called NAME_TABLE, and you wanted to report all the names added to that table since June 15th 1992, where there may be none:
SELECT SURNAME || ', ' || INITIALS FROM NAME_TABLE WHERE DATE_ADDED >= TO_DATE('15-JUN-92') UNION SELECT 'No rows selected' FROM DUAL WHERE NOT EXISTS ( SELECT 1 FROM NAME_TABLE WHERE DATE_ADDED >= TO_DATE('15-JUN-92') )
Hope this helps.
David Hazledine EMBL Data Library Database Administrator PF 10.2209 EMBL Data Library 69012 Heidelberg, Germany
Internet: Hazledine_at_EMBL-Heidelberg.DE
Received on Wed Sep 29 1993 - 11:49:20 CET