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: Procedure to show and spool all the results

Re: Procedure to show and spool all the results

From: DA Morgan <damorgan_at_x.washington.edu>
Date: Tue, 22 Mar 2005 13:14:47 -0800
Message-ID: <1111525878.654627@yasure>


jackfung188_at_gmail.com wrote:

> Hi All,
>
> I want to write a procedure which is able to spool all the select
> statement into a text file.
>
> eg. the result I want in the spool file:
> select * from customer where customer_id=xx;
> select * from order where customer_id=xx;
> select * from product where product_id=yy;
>
> The procedure should allows me to put the xx and yy value when i
> execute the procedure. I heard it's impossible to do unless using ref
> cursor? If so, how can I do it?
>
> Thanks.

You can't. Spool is not available in PL/SQL. Look at UTL_FILE instead.
http://www.psoug.org
click on Morgan's Library
click on UTL_FILE

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Tue Mar 22 2005 - 15:14:47 CST

Original text of this message

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