Re: how to Spool results from SQL plus

From: Andy Triggs <andrew.triggs_at_businessobjects.com>
Date: 7 Apr 2004 09:40:25 -0700
Message-ID: <2b6e86d0.0404070840.5b845f8d_at_posting.google.com>


You can do it like this:

VAR SPOOLFILENAME VARCHAR2(30)
COLUMN SPOOLFILENAME NEW_VALUE SPOOLFILENAME SELECT to_char(sysdate, 'YYMMDD') || '_anything.txt' AS SPOOLFILENAME FROM DUAL;

SPOOLFILENAME



040407_anything.txt

SPOOL &SPOOLFILENAME
...

"Mario Horvat" <mario.horvat_at_vz.htnet.hr> wrote in message news:<c512v5$inv$1_at_sunce.iskon.hr>...
> I want to spool results from sql+ query to txt file.
> txt file should have name like YYMMDD_anything.txt, where YYMMDD is actual
> date.
>
> Can somebody tell me how to write this?
>
> Thanks in advance.
Received on Wed Apr 07 2004 - 18:40:25 CEST

Original text of this message