Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Get a Recordset from a procedure
CREATE OR REPLACE PACKAGE Package_name. AS
TYPE my_cursor_type IS REF CURSOR;
END name;
This is (almost) yours:
CREATE PROCEDURE proc (
input_data IN type,
output_data1 OUT Package_name.My_Cursor_Type is it the way to do this
output_data2 OUT type
AS
BEGIN
OPEN My_Cursor_Type FOR
SELECT .....
END
)
The procedure can be standalone or in the same or another package
"Coquin" <wigwam_at_free.fr> wrote in message
news:wxkA6.166$GM1.97920039_at_nnrp5.proxad.net...
> Sorry I'm newbie in Oracle world.
>
> Can I get a recordset from a procedure ? How ?
>
> What I want to do is :
>
> CREATE PROCEDURE proc (
> input_data IN type,
> output_data1 OUT type ??? is it the way to do this
> output_data2 OUT type
>
> IS
>
> CURSOR curs_name
> SELECT * from table
>
> BEGIN
>
> For index IN curs_name
> Loop
> If .....
> output_data1 := ...
> output_data2 :=
>
> End Loop
> END
> )
> With this method do I get one or several raws of output_datas ?
> I would like to use this cursor with an external language PHP.
>
> Thanks.
>
>
>
>
Received on Tue Apr 10 2001 - 15:27:59 CDT
![]() |
![]() |