Solved

Suppress blank line at top of spool file

Posted on 2006-06-21
4
3,286 Views
Last Modified: 2013-12-11
Hi

I am using SQLPlus script to pull data from a table and spool to a text file. The app I need the spool file for expects certain data in the first line, which is gotten from the table by my script. However the spool file always begins with a blank line. Is there any way of suppressing this blank line? I have Oracle 9.2. The script is below.

Thanks


Script
---------
set serveroutput on;
set feedback off;
set linesize 300;
set heading off;
set pagesize 50000;
set echo off;
--set termout off;
spool spoolfile.txt;
select trim(text13)
from work_table
where code1 = 'UCNTL'
order by number1
;
spool off;
set echo on;
set heading on;
--set termout on;
set feedback on;
0
Comment
Question by:miscok
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 11

Expert Comment

by:pennnn
ID: 16953544
set newpage none;
Hope that helps!
0
 
LVL 27

Accepted Solution

by:
sujith80 earned 250 total points
ID: 17090981
Hi Miscok,

Change the pagesize to - This will solve the issue.
set pagesize 0;

And add the following line too (desirable)
set trimspool on;

Rgds
Sujith.
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question