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: result of stored function

Re: result of stored function

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Fri, 17 Jul 1998 15:23:42 GMT
Message-ID: <35b46c53.3212268@192.86.155.100>


Cursor variables are the answer.

See $ORACLE_HOME/rdbms/demo/oci11.c for an example of using cursor variables. Cursor variables are cursors opened by pl/sql that can be returned as an IN OUT parameter to a client program who will then fetch from them...

A copy of this was sent to Bruno Pennec <Bruno.Pennec_at_der.edfgdf.fr> (if that email address didn't require changing) On Fri, 17 Jul 1998 15:53:08 +0200, you wrote:

>I do requests throw a application which calls the oexec() function
>of OCI interface (oracle v7) and gets the result throw the ofetch() function.
>
>this is my problem :
>I need to do some complex queries and i'd like to store these queries
>in stored functions or procedures.
>i need to get the result like a SELECT statement because i must use
>the predefine application calls.
>
>
>ie, i can do :
>
>EXEC($cursor, "SELECT ...."); /* calls oparse, oexec */
>$result = FETCH($cursor); /* calls ofetch */
>
>i can do also :
>
>EXEC($cursor, "BEGIN foo(bar); END;");
>
>but i'd like to do :
>
>EXEC($cursor, ".... foo(bar);...");
>$result = FETCH($cursor);
>
> with foo(bar) which returns a query result.
>
>How can i do that ?
>
>
>Regards,
>
> bruno
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA  

http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Fri Jul 17 1998 - 10:23:42 CDT

Original text of this message

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