title: How can I remove trailing spaces & extra new line while spooling output?
body: <p>Trailing spaces in the spooled output rpad(' ',40)  are getting truncated.  If i remove the SET TRIMSPOOL on option the line size becomes 400 and there is a extra new line after each select query. What options i need to have the trailing spaces at the end and remove the extra new line.</p>
  
  <pre><code>SET SERVEROUTPUT ON
  SET VERIFY OFF
  SET FEEDBACK OFF
  SET HEADING OFF
  SET LINESIZE 400
  SET TRIMSPOOL ON
  SET PAGESIZE 0
  SPOOL ${T_SPOOL}    
  
  SELECT '0' || rpad(' ',17) || '01' || 'WBC' || rpad(' ',7) || rpad('Accounts ',26) ||     '407081' || rpad('REF',12)  || to_char(sysdate, 'DDMMYY') || rpad(' ',40)
  from dual;
  </code></pre>