Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

skipping a line between queries in a spool report

Status
Not open for further replies.

sherryborden

Programmer
Oct 17, 2008
3
US
I am spooling a report that has many queries. After each query I have a subtitle to that query (REPHEADER) but I need to skip a blank line between the last result of the prior query and starting the REPHEADER for the next query. I do not want to skip a line between each result of a query only when 1 query ends and the next one begins. I've tried using skip -n but it doesn't seem to work. Can someone please help... This seems like such a simple thing to accomplish & yet I've spent days on it.
This is a small sample of what I have

SET echo off
SET HEADING on
SET feedback off
SET termout off
SET term off
--CLEAR COLUMNS
--CLEAR BREAKS
SET linesize 100
SET pagesize 80
SKIP 0
SET newpage NONE
--Invalid Restriction Indicator on FTVFUND:

CLEAR COLUMNS
--CLEAR BreakS

COLUMN ftvfcde HEADING 'Fund|Code' FORMAT A14
COLUMN ftvftyp HEADING 'FType|Code' FORMAT A14
COLUMN ftvrestind HEADING 'Rest|Indicator' FORMAT A14

TTITLE OFF

REPHEADER CENTER 'FTVFUND FTYPE CODE 87' SKIP 2

select ftvfund_fund_code ftvfcde,
ftvfund_ftyp_code ftvftyp,
ftvfund_rest_ind ftvrestind
from ftvfund
where ftvfund_ftyp_code = '87'
and ftvfund_nchg_date > sysdate
and (ftvfund_rest_ind <> 'U' or ftvfund_rest_ind is null);

------------------------------------------------------------
--Invalid Ftype 40 on FTVFUND: - START OF NEXT QUERY
CLEAR COLUMNS
--CLEAR BREAKS

COLUMN ftvfcde HEADING 'Fund|Code' FORMAT A14
COLUMN ftvftyp HEADING 'FType|Code' FORMAT A14
COLUMN ftvrestind HEADING 'Rest|Indicator' FORMAT A14

TTITLE OFF
REPHEADER CENTER 'FTVFUND FTYPE CODE 40' SKIP 2

select ftvfund_fund_code ftvfcde,
ftvfund_ftyp_code ftvftyp,
ftvfund_rest_ind ftvrestind
from ftvfund
where ftvfund_ftyp_code = '40'
and ftvfund_nchg_date > sysdate
and (ftvfund_rest_ind <> 'P' or ftvfund_rest_ind is null);
 
Looks like Oracle. You'd probably get a better answer on an Oracle forum especially since an error is being reported in the code.

That not withstanding, just doing a SELECT ' ' should give you the blank line you seek.

--Jeff Moden
-------------------------------------------------------------------------------
"RBAR" is pronounced "ree-bar" and is a "Modenism" for "Row By Agonizing Row
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top