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

Home -> Community -> Usenet -> c.d.o.server -> Re: Q:Report w SQL Plus

Re: Q:Report w SQL Plus

From: John P. Higgins <jh33378_at_deere.com>
Date: 1998/07/16
Message-ID: <35AEB1CB.DB3BF93@deere.com>#1/1

Try this:

select 'Report Name' , , , , , , , from dual union
your real select

The select from dual will need a literal for every column of the real select. The select from dual will need to have a sort key that will make it sort first / last.

Ralf Bender wrote:

> Hello *.*,
> I'm writing a report like this:
> --------------------------SNIP ON-----------------------------------------
> set echo off
> set linesize 80
> set pagesize 60
>
> column today new_value today_date
> select to_char(sysdate,'HH24:MM:SS DD-Mon-YYYY') today
> from dual;
>
> ttitle left today_date right 'Seite : ' format 999 sql.pno skip 2 -
> center '- Gebuchte, NICHT archivierte Belege -' skip 1
>
> btitle skip 1 '*** D:\ORANT\SOFTMATI\LL0222.SQL ***'
>
> spool d:\orant\softmati\ll0222.txt
> select belegnummer from LL0222notinscan order by 1;
> spool off
> host print d:\orant\softmati\ll0222.txt
> exit
> --------------------------SNIP OFF-----------------------------------------
> If the select found any rows, the report looks ok.
> But if there no rows, it only write that there no rows found. How can I get
> the ttitle and bttitle, when no rows found.
>
> Such report print automatically in the evening, and if there more reports
> with no rows I don't know which report it is.
>
> bye ,
> ralf
> mailto:Ralf.Bender_at_wolnet.de
Received on Thu Jul 16 1998 - 00:00:00 CDT

Original text of this message

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