Solved

Suppress blank line at top of spool file

Posted on 2006-06-21
4
3,274 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
Comment Utility
set newpage none;
Hope that helps!
0
 
LVL 27

Accepted Solution

by:
sujith80 earned 250 total points
Comment Utility
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
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.  …
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now