Select using DBMS_SQL.EXECUTE (merged) [message #670388] |
Mon, 02 July 2018 00:44 |
|
fabi88
Messages: 112 Registered: November 2011
|
Senior Member |
|
|
Hi,
How can I retrieve result set from a procedure when use DBMS_SQL.EXECUTE for select from a table:
DBMS_SQL.PARSE(cursor_var, "SELECT * FROM persons WHERE person_id=:person_id", DBMS_SQL.NATIVE);
DBMS_SQL.BIND_VARIABLE(cursor_var, 'person_id', in_person_id);
rows_complete := DBMS_SQL.EXECUTE(cursor_var);
DBMS_SQL.CLOSE_CURSOR(cursor_var);
I want the above code returns a cursor like following code, I mean I need a ref cursor as output of procedure:
sql_stsmt="SELECT * FROM persons WHERE person_id=:person_id"
OPEN ref_curs1 FOR sql_stsmt Using in_person_id
Thanks for your favor in advance.
|
|
|
|
|
|
|
|
|