Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Reg. SPOOL in SQL*PLUS
It can be done like this:
column ext noprint new_value ext
select to_char(sysdate,'HH24MI') ext
from dual;
spool File.&ext
select ...
spool off
The output will be in a file 'File.xxxx' where xxxx is the formatted time.
-----Original Message-----
From: Arul kumar [SMTP:rakumar_at_mahindrabt.com]
Sent: Monday, February 05, 2001 11:45 PM
To: Multiple recipients of list ORACLE-L Subject: Reg. SPOOL in SQL*PLUS
Hi DBAs,
I would like to know the way for specifying a filename dynamically in SQL PLUS. Say, for example
The file name should be suffixed with a sequence number available from a SEQUENCE object. ( like SPOOL <filename>||seq1.nextval).....
Any idea?
Thank You,
Arul.
<< File: ATT00052.html >>
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: William Rogge
INET: William_Rogge_at_voltek.com
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists --------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Tue Feb 06 2001 - 10:38:49 CST