Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Spooling in PL/SQL

Re: Spooling in PL/SQL

From: DA Morgan <damorgan_at_x.washington.edu>
Date: Wed, 23 Mar 2005 14:49:06 -0800
Message-ID: <1111617937.750750@yasure>


iceriver wrote:

> Hi All,
>
> 1) 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? Someone has suggested it can done thru UTL_FILE. What you guys
> opinions?
>
> 2) If I only want the the procedure to display results on the screen
> (no spooling), how I can achieve that?
>
> Thanks.

Which instructor at which school is asking for this?

Of course it can be done through UTL_FILE. That is also essentially the only way it can be done.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Wed Mar 23 2005 - 16:49:06 CST

Original text of this message

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