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: Select from a REF CURSOR

Re: Select from a REF CURSOR

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Fri, 07 Nov 2003 15:11:45 -0800
Message-ID: <1068246726.142011@yasure>


Paul Moore wrote:

>This may be a dumb question, but I've never got my head round the
>strange TABLE(CAST(...)) syntax. I have a function which returns a REF
>CURSOR. What I'd like to do is to use this function in a SELECT
>statement. Something like:
>
> CREATE FUNCTION f(args) RETURNS SYS_REFCURSOR ...
>
> SELECT * FROM f(1,2,3);
>
>Is this possible, and if so what syntax should I be using?
>
>Thanks,
>Paul.
>
>

I'd suggest using a stored procedure rather a function. Return the REF CURSOR as an OUT
parameter.

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Fri Nov 07 2003 - 17:11:45 CST

Original text of this message

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