Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Suppressing a blank line in a union

Re: Suppressing a blank line in a union

From: Jack van Zanen <nlzanen1_at_EY.NL>
Date: Tue, 17 Sep 2002 23:18:21 -0800
Message-ID: <>

How about removing the skip3


                      "Fink, Dan"                                                                                                      
                      <        To:       Multiple recipients of list ORACLE-L <>                   
                      >                        cc:       (bcc: Jack van Zanen/nlzanen1/External/MEY/NL)                                
                      Sent by:                 Subject:  Suppressing a blank line in a union                                           
                      18-09-2002 02:13                                                                                                 
                      Please respond to                                                                                                

I've got a nasty bit of sql using a union to provide a header line. SQL*Plus likes to place a blank line between the output of the unions and I want to get rid of it. I've done it before, but I have forgotten. I do recall that we never found documentation on it and 'stumbled' across the solution.
The sql is below

Dan Fink

column session_header format a1000

column sort_col1 noprint
column sort_col2 noprint
column sort_col3 noprint

set linesize 1001 trimspool on trimout on break on sort_col1 skip 3

select s.sid sort_col1,

       1 sort_col2,
       0 sort_col3,

'System ID = '||to_char(s.sid,'999')||chr(10)||chr(9)||
'Username/Schemaname= '||s.username||'/'||s.schemaname||chr(10)
'Status = '||s.status||chr(10)||chr(9)||
'Client info'||chr(10)||chr(9)||chr(9)||
'O/S user = '||s.osuser||chr(10)||chr(9)||chr(9)||
'Machine Name = '||s.machine||chr(10)||chr(9)||chr(9)||
'Terminal Name = '||s.terminal||chr(10)||chr(9)||
'dbServer info'||chr(10)||chr(9)||chr(9)||
'O/S Process Id = '||p.spid||chr(10)||chr(9)||chr(9)||
'O/S Username = '||p.username||chr(10)||chr(9)||chr(9)||
'Terminal Name = '||p.terminal||chr(10)||chr(9)||chr(9)||
'Program = '||p.program||chr(10)||chr(9)||chr(9)||
'Login Time = '||to_char(s.logon_time, 'YYYY/MM/DD:hh24:mi:ss')
from v$session s,

     v$process p
where s.type != 'BACKGROUND'
  and s.paddr = p.addr
select e.sid sort_col1,

       2 sort_col2,
       2 sort_col3,

'Wait Event Information '||chr(10)||chr(9)||
rpad('Event',30)||'(Waits/Timeouts/Waited/Avg Wait/Max Wait)'
from v$session_event e
where e.sid in (select s.sid
                from v$session s
                where s.type != 'BACKGROUND')
  and e.event not like 'SQL*N%'
select e.sid sort_col1,
       3 sort_col2,
       e.total_waits sort_col3,
       lpad(to_char(e.max_wait),09)||')' wait_info
from v$session_event e
where e.sid in (select s.sid
                from v$session s
                where s.type != 'BACKGROUND')
  and e.event not like 'SQL*N%'
order by sort_col1 asc, sort_col2 asc, sort_col3 desc;

System ID = 57

        Username/Schemaname= SCOTT/TIGER
        Status = INACTIVE
        Client info
                O/S user = scott
                Machine Name = tiger
                Terminal Name = unknown
        dbServer info
                O/S Process Id = 26276
                O/S Username = oracle
                Terminal Name = UNKNOWN
                Program = oracle_at_tiger2 (TNS V1-V3)
                Login Time = 2002/09/17:21:49:10

Wait Event Information
        Event                         (Waits/Timeouts/Waited/Avg Wait/Max
                                                                    <---- I
want to get rid of this line.
        db file sequential read       ( 2799        0     18        0
        log file sync                 (  409        0    244        1
        db file scattered read        (  307        0      5        0
        latch free                    (   12        0      2        0
        direct path write (lob)       (    5        0      0        0
        async disk IO                 (    4        0      0        0
        enqueue                       (    3        0      9        3
        log file switch completion    (    1        0      4        4

De informatie verzonden in dit e-mailbericht is vertrouwelijk en is uitsluitend bestemd voor de geadresseerde. Openbaarmaking, vermenigvuldiging, verspreiding en/of verstrekking van deze informatie aan derden is, behoudens voorafgaande schriftelijke toestemming van Ernst & Young, niet toegestaan. Ernst & Young staat niet in voor de juiste en volledige overbrenging van de inhoud van een verzonden e-mailbericht, noch voor tijdige ontvangst daarvan. Ernst & Young kan niet garanderen dat een verzonden e-mailbericht vrij is van virussen, noch dat e-mailberichten worden overgebracht zonder inbreuk of tussenkomst van onbevoegde derden.

Indien bovenstaand e-mailbericht niet aan u is gericht, verzoeken wij u vriendelijk doch dringend het e-mailbericht te retourneren aan de verzender en het origineel en eventuele kopieŽn te verwijderen en te vernietigen.

Ernst & Young hanteert bij de uitoefening van haar werkzaamheden algemene voorwaarden, waarin een beperking van aansprakelijkheid is opgenomen. De algemene voorwaarden worden u op verzoek kosteloos toegezonden.

The information contained in this communication is confidential and is intended solely for the use of the individual or entity to whom it is addressed. You should not copy, disclose or distribute this communication without the authority of Ernst & Young. Ernst & Young is neither liable for the proper and complete transmission of the information contained in this communication nor for any delay in its receipt. Ernst & Young does not guarantee that the integrity of this communication has been maintained nor that the communication is free of viruses, interceptions or interference.

If you are not the intended recipient of this communication please return the communication to the sender and delete and destroy all copies.

In carrying out its engagements, Ernst & Young applies general terms and conditions, which contain a clause that limits its liability. A copy of these terms and conditions is available on request free of charge.

Please see the official ORACLE-L FAQ:
Author: Jack van Zanen
  INET: nlzanen1_at_EY.NL

Fat City Network Services    -- 858-538-5051
San Diego, California        -- Mailing list and web hosting services
To REMOVE yourself from this mailing list, send an E-Mail message
to: (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Wed Sep 18 2002 - 02:18:21 CDT

Original text of this message