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

Spool File

Status
Not open for further replies.

nread

Technical User
Oct 31, 2001
58
GB
Can someone tell me how to generate a file called xxxxxx.sql
using spool xxxxxx. I don't want it to create a file called xxxxxx.lst

Cheers
 
All you have to do is:

spool xxxxxx.sql
[whatever should go in file]
spool off


if you don't specify a path for your file it will get created in the bin directory.
 
Because the spool file is specified by the user at the point the sql is kicked off it still adds on .lst and ingnore the .sql.
The file that is created is called xxxxxxsql.lst

Any ideas


set pages 0
set verify off
set feedback off
undef script
undef start
undef end

select 'start '||'&script'||'.sql'||' '||to_char(itc_date,'ddmmyy') from ina_table_control where itc_date between '&start' and '&end'

spool &&script.sql
/
spool off
 
Add one more dot:

spool &&script..sql
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top