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: Geting the resultset out of a PROCEDURE INTO A select statement

Re: Geting the resultset out of a PROCEDURE INTO A select statement

From: Darren K. Cockrel <derwoud_at_bellsouth.net>
Date: Tue, 01 Sep 1998 03:37:58 GMT
Message-ID: <q_JG1.117$S66.487967@news1.atl.bellsouth.net>


You can only use fuctions in a select statment, not procs. You can however set SERVEROUTPUT ON and then loop through the procedure using the DBMS_OUTPUT.PUTLINE(cursor_stuff); to see the results at the SQL*Plus prompt.
Darren
dfrank wrote in message <35EAC084.C2A42883_at_athena.nufringen.fallet.com>...
>Hi,
>
>I need help for the following problem:
>I have a procedure which returns a CURSOR. I would
>like to issue a SELECT in SQLPlus which displays its contents.
>Something like this:
>/* My Type as a CURSOR Variable*/
>TYPE MYCUR IS REF CURSOR;
>
>/* MY Procedure doing the select */
>CREATE PROCEDURE GET_CUR(db_mycur IN OUT MYCUR) AS
>BEGIN
> OPEN db_mycur for
> SELECT * FROM A;
>END;
>
>/* MY SELECT Statement which calls the PROCEDURE and returns
> the result of the CURSOR */
>SELECT * FROM GET_CUR; ????
>
>As you can see, I don't know how this select has to look like.
>
>Thanks for your help
>
>Stefan Fallet (sfallet_at_fallet.com)
>
Received on Mon Aug 31 1998 - 22:37:58 CDT

Original text of this message

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