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" <ma**********@vz.htnet.hr> wrote in message news:<c5**********@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.