Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> dynamic SPOOL filename
Hello,
I'd like to store the name of the spool file in a variable.
For instance, rather than :
set echo off newpage 0 space 0 pagesize 0 feed off head off trimspool on
spool oradata.txt select col1 || ',' || col2 || ',' || col3 from tab1 where col2 = 'XYZ'; spool off
I want this kind of thing :
filename:='oradata.txt';
spool filename
But, obviously, i guess that if i do this thing, oracle will store its
results
in a file called 'filename', not 'oradata.txt'.
Thx in advance and sorry for my pathetic english.
Antoine Received on Thu Jun 20 2002 - 14:40:07 CDT
![]() |
![]() |