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: Ref Cursor

Re: Ref Cursor

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Fri, 20 Feb 2004 10:38:13 -0800
Message-ID: <1077302250.464774@yasure>


Alex wrote:

> I'm trying to execute a dynamic SQL statement using a ref cursor
> variable. The following is a simple example of what I'm trying to
> accomplish. I'd like to know how to declare the variable v_cur_dat to
> be able to accept any output, not only from table emp? Thanks in
> advance for your help.
>
> Alex
>
>
> DECLARE
>
> TYPE ref_cur_type IS REF CURSOR;
> v_cur ref_cur_type;
>
> v_cur_dat ??????
>
> BEGIN
> OPEN v_cur FOR SELECT * FROM emp;
>
> FETCH v_cur INTO v_cur_dat;
>
> END;
The page isn't completed but check out the demo at: http://www.psoug.org/reference/ref_cursors.html

-- 
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 Feb 20 2004 - 12:38:13 CST

Original text of this message

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