How to remove unnecessary line breaks in SQL Plus Spooling?

ladiesman1792 picture ladiesman1792 · Oct 28, 2014 · Viewed 16.8k times · Source

I am spooling a package from a database and this is what I get:

CREATE OR REPLACE PACKAGE BODY "CPI"."GIPI_WBOND_BASIC_PKG"                   
    AS                                                                              
       FUNCTION get_gipi_wbond_basic (p_par_id gipi_wbond_basic.par_id%TYPE)        
          RETURN gipi_wbond_basic_tab PIPELINED                                     
       IS                                                                           
          v_wbond   gipi_wbond_basic_type;                                          
       BEGIN                                                                        
          FOR i IN (SELECT a.par_id,        a.obligee_no,    a.bond_dtl,      a.inde
    mnity_text,                                                                     
                           a.clause_type,   a.waiver_limit,  a.contract_date, a.cont
    ract_dtl,                                                                       
                           a.prin_id,       a.co_prin_sw,    a.np_no,         a.coll
    _flag,                                                                          
                           a.plaintiff_dtl, a.defendant_dtl, a.civil_case_no        
                      FROM gipi_wbond_basic a                                       
                     WHERE a.par_id = p_par_id)  

And I am expecting it to be something like this:

CREATE OR REPLACE PACKAGE BODY cpi.gipi_wbond_basic_pkg
AS
   FUNCTION get_gipi_wbond_basic (p_par_id gipi_wbond_basic.par_id%TYPE)
      RETURN gipi_wbond_basic_tab PIPELINED
   IS
      v_wbond   gipi_wbond_basic_type;
   BEGIN
      FOR i IN (SELECT a.par_id, a.obligee_no, a.bond_dtl, a.indemnity_text,
                       a.clause_type, a.waiver_limit, a.contract_date,
                       a.contract_dtl, a.prin_id, a.co_prin_sw, a.np_no,
                       a.coll_flag, a.plaintiff_dtl, a.defendant_dtl,
                       a.civil_case_no
                  FROM gipi_wbond_basic a
                 WHERE a.par_id = p_par_id)

Please help me on how can I get rid of those new lines and ugly format. Thanks!

Answer

ladiesman1792 picture ladiesman1792 · Oct 28, 2014

Ok this one solved my problem.

From this,

SET HEADING OFF;
SET ECHO OFF;
SET PAGES 999;
SET LONG 999999;

I added this:

SET LONGCHUNKSIZE 999999;
SET PAGESIZE 0;
SET LINESIZE 500;