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 -> dynamic SPOOL filename

dynamic SPOOL filename

From: Antoine Tissier <nospam_at_nospam>
Date: Thu, 20 Jun 2002 21:40:07 +0200
Message-ID: <3d122e59$0$231$626a54ce@news.free.fr>


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

Original text of this message

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