Home » SQL & PL/SQL » SQL & PL/SQL » Spooling my files so sql is not included in output file
Spooling my files so sql is not included in output file [message #1447] Wed, 01 May 2002 06:52 Go to next message
Mandy
Messages: 4
Registered: May 2002
Junior Member
hello

I can spool files and run reports fine, ive turned the header and column seperation commands off but i want to be able to spool my files so that i dont get the sql i used in the output file with my results. any ideas? or is it just something i have to put up with?

Mand
Re: Spooling my files so sql is not included in output file [message #1449 is a reply to message #1447] Wed, 01 May 2002 08:07 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10672
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
SQL> get op
1 set termout off
2 set feedback off
3 set heading off
4 spool c:test.lst
5 select * from emp;
6 select * from dept;
7* spool off;
SQL>
Re: Spooling my files so sql is not included in output file [message #195439 is a reply to message #1449] Thu, 28 September 2006 11:14 Go to previous messageGo to next message
Mike Bentley
Messages: 8
Registered: September 2006
Junior Member
I am having the same problem and I have used

set feedback off
set heading off
set termout off
set echo off
spool ctbnd.sql
select 'define vsysdate = ',
to_char(sysdate, 'yyyy-mm-dd-hh24:mi:ss') from dual;
spool off

as an example. The spool file ctbnd.sql then contains

SQL> select 'define vsysdate = ',
2 to_char(sysdate, 'yyyy-mm-dd-hh24:mi:ss') from dual;

define vsysdate = 2006-09-28-10:39:56
SQL> spool off

What am I missing here?

Mike

[Updated on: Thu, 28 September 2006 11:15]

Report message to a moderator

Re: Spooling my files so sql is not included in output file [message #195486 is a reply to message #195439] Fri, 29 September 2006 00:36 Go to previous message
Frank
Messages: 7880
Registered: March 2000
Senior Member
You have to put these statements in a file and then execute this file.
Previous Topic: Using Bind with IN
Next Topic: Negative value in braces
Goto Forum:
  


Current Time: Sun Dec 04 10:13:57 CST 2016

Total time taken to generate the page: 0.11051 seconds