By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,197 Members | 972 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,197 IT Pros & Developers. It's quick & easy.

Spool

P: n/a
In Oracle 7.0 (VMS) I have a Pl/Sql script, in which there is a cursor
c that retrives CustNo field. For each CustNo I make a query inside
the cursor and would need to spool each of these query results
(several rows) to a different file. That is, Result of the query for
CustNo AX would be placed in file R00001.DAT, CustNo BX in file
R00002.DAT and so on.

UTL_FILE can not be used.

Maybe I should call a COM or SqlPlus file, where the spooling would
happen, but I can't make it work..

Jani
Jul 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
ja*******@pp.nic.fi (Jani Ahti) wrote in message news:<a5**************************@posting.google. com>...
In Oracle 7.0 (VMS) I have a Pl/Sql script, in which there is a cursor
c that retrives CustNo field. For each CustNo I make a query inside
the cursor and would need to spool each of these query results
(several rows) to a different file. That is, Result of the query for
CustNo AX would be placed in file R00001.DAT, CustNo BX in file
R00002.DAT and so on.

UTL_FILE can not be used.

Maybe I should call a COM or SqlPlus file, where the spooling would
happen, but I can't make it work..

Jani


You have it reversed. You need a SqlPlus script to call you PL/SQL
procedure. and then likely a DCL script arount that. Why? well using
the DBMS_OUTPUT package has a limit on the output size (changeable,
abut only to a MAX of one million bytes). And the DCL will be able to
handle sending the output to the individual files.

HTH,
Ed
Jul 19 '05 #2

P: n/a
ja*******@pp.nic.fi (Jani Ahti) wrote in message news:<a5**************************@posting.google. com>...
In Oracle 7.0 (VMS) I have a Pl/Sql script, in which there is a cursor
c that retrives CustNo field. For each CustNo I make a query inside
the cursor and would need to spool each of these query results
(several rows) to a different file. That is, Result of the query for
CustNo AX would be placed in file R00001.DAT, CustNo BX in file
R00002.DAT and so on.

UTL_FILE can not be used.

Maybe I should call a COM or SqlPlus file, where the spooling would
happen, but I can't make it work..

Jani


You have it reversed. You need a SqlPlus script to call you PL/SQL
procedure. and then likely a DCL script arount that. Why? well using
the DBMS_OUTPUT package has a limit on the output size (changeable,
abut only to a MAX of one million bytes). And the DCL will be able to
handle sending the output to the individual files.

HTH,
Ed
Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.