| TTITLE not working when no rows selected [message #144908] |
Fri, 28 October 2005 14:38  |
Matthew Waugh
Messages: 71 Registered: October 2004
|
Member |
|
|
When I execute the following script, the first page is blank, except for "no rows selected" at the top. The second page then kicks off with the text "REPORT 2", and the selected records for the 2nd script
So.....how do you get the title to show even if there are no rows returned?
SPOOL H:/LUCAS.TXT
SET PAGESIZE 60
SET LINESIZE 110
SET NEWPAGE 0
COLUMN NAME FORMAT A15
TTITLE LEFT 'REPORT 1' SKIP 1-
LEFT 'PAGE:' -
FORMAT 999 SQL.PNO SKIP 2
SELECT EMPLID,PAYGROUP,FILE_NBR
FROM PS_EMPLOYEES
WHERE JOBCODE = '3001';
TTITLE LEFT 'REPORT 2' SKIP 1-
LEFT 'PAGE:' -
FORMAT 999 SQL.PNO SKIP 2
SELECT A.EMPLID,SUBSTR(A.NAME,1,15) AS NAME,A.JOBCODE,A.PAYGROUP
FROM PS_EMPLOYEES A;
SPOOL OFF
[Updated on: Fri, 28 October 2005 14:39] Report message to a moderator
|
|
|
|
|
|
| Re: TTITLE not working when no rows selected [message #145053 is a reply to message #145050] |
Mon, 31 October 2005 11:03   |
 |
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
Try this?
Table Dept has no records.
Table Emp has records.
scott@9i > get script
1 SPOOL LUCAS.TXT
2 SET PAGESIZE 60
3 SET LINESIZE 110
4 SET NEWPAGE 0
5 COLUMN NAME FORMAT A15
6 COLUMN NEVERPRINTTHIS NOPRINT
7 TTITLE LEFT 'REPORT 1' SKIP 1-
8 LEFT 'PAGE:' -
9 FORMAT 999 SQL.PNO SKIP 2
10 select 'x' NEVERPRINTTHIS from dual;
11 Select * from dept;
12 TTITLE LEFT 'REPORT 2' SKIP 1-
13 LEFT 'PAGE:' -
14 FORMAT 999 SQL.PNO SKIP 2
15 select * from emp;
16* SPOOL OFF
17
scott@9i >
[Updated on: Mon, 31 October 2005 11:04] Report message to a moderator
|
|
|
|
|
|