Home » SQL & PL/SQL » SQL & PL/SQL » Return Cursor problem
Return Cursor problem [message #36355] Mon, 19 November 2001 13:39 Go to next message
Messages: 16
Registered: October 2001
Junior Member
I have a procedure (MySQLStatement IN varchar2,
MyReturnCursor OUT returncursor);

NOTE : I have defined the return cursor as ref cursor and it works.

In my procedure, I need to manipulate the input string which is nothing but a select statement. I create a local variable MyNewSQLStatement in which I put this new massaged sqlstatement and then, do the following :

OPEN MyReturnCursor FOR MyNewSqlStatement;


If I say
OPEN MyReturnCursor FOR

But If I say

MyNewSQLStatement = 'SELECT * FROM MYTABLE WHERE ID = 1243;';
OPEN MyReturnCursor FOR MyNewSqlStatement; -- does not work. I tried && also.

Please help!!
Thanks in advance.

Re: Return Cursor problem [message #36358 is a reply to message #36355] Tue, 20 November 2001 04:26 Go to previous message
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
what error you are getting?. remove semicolon in your sql statement.
try this:

MyNewSQLStatement = 'SELECT * FROM MYTABLE WHERE ID = 1243';
OPEN MyReturnCursor FOR MyNewSqlStatement;

Previous Topic: Re: How to execute a procedure stored in a database column?
Next Topic: Null varchar
Goto Forum:

Current Time: Sun Sep 27 14:45:13 CDT 2020