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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Spool File Problem

Status
Not open for further replies.

htran

Technical User
Apr 21, 2003
20
0
0
US
Hi all,

I am running a query which will pull approx 35,000 rows of record. The script is very simple as shown below:

******************************
set echo off
set feedback off
set pages 0
set heading off
set flush off
set trimspool on
SELECT SKU, MANUFACTURERSKU,RETAILSKU,ALTSKU FROM SKU;
SPOOL C:\SKU_TBL\REPORT.TXT;
SPOOL OFF;
exit
*******************************


I could see every thing on the screen but the spool file contains zero data/record... simply a blank file. I already tried to change the file extension to .doc/.xls/.log but it is still the same problem.

Can someone help me with this? Am I missing some thing????

Thanks....
Hugh
 
The spool command MUST be before the select. try

set termout off
SPOOL C:\SKU_TBL\REPORT.TXT
SELECT SKU, MANUFACTURERSKU,RETAILSKU,ALTSKU FROM SKU;
SPOOL OFF;
set termout on


The termout command will stop the output to the screen, but still spool to the file.

Bill
Oracle DBA/Developer
New York State, USA
 
Move SPOOL C:\SKU_TBL\REPORT.TXT; in front of your select statement.

-lw
 
Thanks for the quick reply... It was my mistake... it is Friday afternoon and I am looking toward the weekend already.... Yes, the spool command must be placed before the select statement!!!!!

Once again... Thanks.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top