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: Stored Procedures

Re: Stored Procedures

From: Ole Christian Meldahl <konocm_at_statoil.com>
Date: Fri, 08 Oct 1999 08:26:26 +0200
Message-ID: <37FD8E92.93E4940C@statoil.com>


Marvin wrote:

> In ORACLE can a stored procedure be created such that
> it returns a query. That is, basically instead of a stored procedure
> that does INSERTS, UPDATES or DELETES , What I want is really a stored
> query, a SELECT with a really ugly WHERE caluse that I can pass
> parameters into. What I don't know is how to get a hold of a query
> result and pass it back to the caller. Is a stored function that
> returns a cursor a possibility? Even then how do I throw the cursor
> back to the issuer of the query?
>
> Help me SQL gods, your my only hope

I'm replying to this on behalf of one of the actual gods.......

See Thomas Kyte's http://govt.oracle.com/~tkyte/ and click on "Getting Result Sets from Stored Procedures (HOWTO) "

Please note that using DBMS_SQL is not possible AFAIK for creating the cursor, you must have a static SQL and pass parameters to it.

I guess "issuer of the query" is relevant as well. The HOWTO includes example of using ODBC. Who's your "issuer"?

ole c Received on Fri Oct 08 1999 - 01:26:26 CDT

Original text of this message

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