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: How to spool in a cursor loop

Re: How to spool in a cursor loop

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Sun, 11 Jan 2004 10:13:39 +0100
Message-ID: <40011362$0$17117$626a54ce@news.free.fr>

"egkua" <egkua_at_tm.net.my> a écrit dans le message de news:b2803687.0401102110.71321adb_at_posting.google.com...
> I would like to create a file using a spool while in a cursor loop.
> Loop
> if false
> spool off
> true;
> file1 = '..';
> end if
> if true
> spool file1
> end if
> DBMS_OUTPUT.PUT_LINE(...);
> End Loop
>
> It this possible and how?

No, spool is an SQL*Plus command not PL/SQL. You can use dbms_file package instead.

Regards
Michel Cadot Received on Sun Jan 11 2004 - 03:13:39 CST

Original text of this message

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