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: HELP! ORACLE Stored Procedures and multiple rows

Re: HELP! ORACLE Stored Procedures and multiple rows

From: Oracle DBA <robin.b.franklin_at_boeing.com>
Date: Mon, 8 Jun 1998 16:38:46 GMT
Message-ID: <Eu8rKH.26o@news.boeing.com>


Assumed that you have permission to create a file on /temp directory, add the spool ON/OFF execute statement before and after the SELECT will do the work!

Good luck,
Sam

CREATE OR REPLACE PROCEDURE FOO ( BLAH ) BEGIN
spool /temp/my_foo_data.lst
  SELECT * FROM TABLE WHERE COLUMN = VALUE; END;
 spool off

++++++++++++++++++++++++++++++++++++++++++++++

Norman Kabir wrote:

> Hi.
>
> I'm trying to get Oracle stored procedures to return datasets. I'd like to
> do something like
>
> CREATE OR REPLACE PROCEDURE FOO ( BLAH )
> BEGIN
> SELECT * FROM TABLE WHERE COLUMN = VALUE;
> END;
>
> Where it returns a bunch of rows. How is this done?
>
> Thanks!
>
> Cheers,
> --Norm
Received on Mon Jun 08 1998 - 11:38:46 CDT

Original text of this message

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