Solved

Suppress blank line at top of spool file

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

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.

Question has a verified solution.

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

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…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

920 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

16 Experts available now in Live!

Get 1:1 Help Now