Solved

Suppress blank line at top of spool file

Posted on 2006-06-21
4
3,284 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
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

685 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