Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: HELP! ORACLE Stored Procedures and multiple rows
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