Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL*PLUS and placing sysdate in spool filename

Re: SQL*PLUS and placing sysdate in spool filename

From: Lars Bo Vanting <lars.vanting_at_ex.sni.ch>
Date: Thu, 28 Jan 1999 12:55:38 +0100
Message-ID: <78pj6g$7bn$1@news.mch.sbs.de>


Something like

SET HEADING OFF FEEDBACK OFF TERMOUT OFF PAUSE OFF SPOOL spooldest.tmp
SELECT 'SPOOL '||'SPOOL'||to_char(SYSDATE,'YYYYMMDD')||'.LST' "Using Following Spool" FROM DUAL
/
SPOOL OFF
@spooldest.tmp
SET HEADING ON TERMOUT ON FEEDBACK ON SERVEROUT ON /

could work (you must edit it to suit your needs). Uses a temporary file to create and execute the SPOOL statement.

Regards

Lars Bo Vanting
COREBIT TPI AG, Switzerland
Christopher Beck <clbeck_at_us.oracle.com> schrieb in Nachricht 36af70a9.109250874_at_inet16.us.oracle.com...///
>On 27 Jan 1999 19:36:56 GMT, "Pat Gorden-Ozgul" <gorden_at_xs.bis.bnl.gov>
wrote:
>
>>We run spool files in batch mode and would like to place the actual date
in
>>the stored spool filename itself for auditing purposes.
>>
>
>Add this as the first lines of the batch
>
>set heading off
>select 'Starting process '||to_char(sysdate,'DD-MON-YYYY HH24:mi:ss') from
dual;
>set heading on
>
>
>>If you know how, pls email me: gorden_at_bnl.gov. Thx.
>
>
>--
>Christopher Beck
>Oracle Corporation
>clbeck_at_us.oracle.com
>Reston, VA.
>---------------------------------------------------------------------------
-
>Opinions are mine and do not necessarily reflect those of Oracle
Corporation Received on Thu Jan 28 1999 - 05:55:38 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US