Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Help!! REF CURSORS & DBMS_SQL

Help!! REF CURSORS & DBMS_SQL

From: <midascs_at_my-dejanews.com>
Date: Tue, 10 Nov 1998 10:46:30 GMT
Message-ID: <7295i6$4o9$1@nnrp1.dejanews.com>


We are currently using Oracle 7.3.2.3.0 on HPUX

The question relates to the use of Ref cursors.

We have the situation where a stored procedure *must* return a REF CURSOR data type. However, we also need the the dynamic nature of the the DBMS_SQL package so we can, in certain situations, generate an SQL statement that will be optimised for performance depending what search criteria has been passed to the procedure ('cos we have large amopunts of data).

I was think ing along the lines of

 v_cur := dbms_sql.open_cursor;
dbms_sql.parse (my_cur, 'open :ref_cur_bind for select col1 from my_table', bms_sql.v7);
etc...

However I can't find a dbms_sql.bind_variable method to that allows me to bind the variable to an actual ref cursor....

Any Ideas?

Can anyone tell me if this is at all possible, and if so how to go about it

Cheers
Mark

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Tue Nov 10 1998 - 04:46:30 CST

Original text of this message

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