Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

the First line in the spool file is blank when i run a simple query

Status
Not open for further replies.

isonlyme

Programmer
Apr 20, 2002
171
PR
Hi Guys!!

Im doing this SQL statement to create a spool file with the results, but the firstline is always in blank then all the record are written:

--set pagesize 0
set heading off
set feedback off
set linesize 255
set verify off
set termout off
set echo off
spool /MyunixPath/result.txt
SELECT rpad(tracking.accountnumber,30)||
rpad(tracking.CONTROL1,4)||
rpad(tracking.applicationid,2)||
rpad(service.servicename,25)||
lpad(status.statusname,10)
FROM Myuser.tracking tracking,
Myuser.service service,
Myuser.mailout
WHERE MyTABLE.assignedcsuserid = csuser.csuserid AND
MyTABLE.serviceid = spser.serviceid AND
TRUNC(MyTABLE.CREATIONDATETIME) = TRUNC(SYSDATE) and
spmai.mailoutid in (36,38)
ORDER BY MyTABLE.creationdatetime ASC,
spser.sortorder ASC,
MyTABLE.trackingid ASC;
spool off
exit

Any IDeas

Thanks in advance!!!!
 
An example of the output would be good (just the first few lines) :)

Alex
 
Thanks for replying

This is an example:
----------------------------------------------------------

EDUARDO SILVA-ANDINO 14-JUN-04Comments Customer Request 36 Reset

as you can see after the dotted lines (made by me to show the start of the file in this message) there's a blank line.

Thanks on advance!
 
Wilfredo,

Strangely, I believe you have your solution commented out in your code: "SET PAGESIZE 0" suppresses the extra line that results from "SET HEADING 0", which still generates a single blank line although the rest of the heading disappears. Try it and let us know the results.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA @ 15:58 (17Jun04) UTC (aka "GMT" and "Zulu"), 08:58 (17Jun04) Mountain Time)
 
oh , me dummy, you were right it was on remark...

thanks for the time to responde
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top