Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

spooling multiple files by spooling within the iterations of a loop

Asif M. NaqviMar 15 2007 — edited Mar 16 2007
Is there any way to spool files recursively within a loop and with different names?
<br>
what i wish to get is a set of files (a few hundred in number) containing the result of some queries and written out as some spooled files. so loosely, it should be something like this: </p>
<i>for j in 1.. someNum LOOP <br>
spool filename_j <br>
select whatever from that_table <br>
where something = this_value <br>
/ <br>
spool off <br>
end loop <br>
</i> <br>
<br>
here the name of the spooled files should be assigned from the iterations of the loop; like filename1, filename2, filename3, .... etc
</p>
any hints or ideas will be greatly appreciated! <br>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 13 2007
Added on Mar 15 2007
13 comments
5,529 views