How to spool from a cursor ?
From: JR <jose_raposo_at_yahoo.com>
Date: Thu, 4 Mar 1999 13:37:12 -0000
Message-ID: <7bm27j$tdi$1_at_duke.telepac.pt>
Hi
[Quoted] I have to spool to a file the contents of a table. To do that I'm using a sql script like this: set (linesize, heading,...)
spool msg.out
select text
from message_lines
where msg_num =(select message_num from replies) and flg_msg='R'
order by num_line;
spool off;
Date: Thu, 4 Mar 1999 13:37:12 -0000
Message-ID: <7bm27j$tdi$1_at_duke.telepac.pt>
Hi
[Quoted] I have to spool to a file the contents of a table. To do that I'm using a sql script like this: set (linesize, heading,...)
spool msg.out
select text
from message_lines
where msg_num =(select message_num from replies) and flg_msg='R'
order by num_line;
spool off;
This works fine, as long as I have one reply on replies table. Now if I have multiple replies, I have to spool to diferent files.
I would like to do something like:
declare
cursor A (cursor declaration)
begin
for x in A loop
set ...
spool msg.out
select text from message_lines
where msg_num =x.message_num ...
...
spool off;
! <change name at o.s. level>
end loop;
end;
How can I do that ?
I can't use the UTL_FILE
Thanks in advance
Jose Raposo
Received on Thu Mar 04 1999 - 14:37:12 CET