wellster34
Programmer
Hello,
I have a dynamically created select statement and store it in VARCHAR2 variable. Now, I need to open and execute it to fetch the values.
DECLARE
...
TYPE cv_type IS REF CURSOR;
TEST_CURSOR cv_type;
...
BEGIN
...
OPEN TEST_CURSOR FOR v_select_string;
I'm good to here but I have not figured out to fetch it. I have tried the FOR testing_cur IN TEST_CURSOR LOOP....END LOOP;
I get the PLS-00221: 'TEST_CURSOR' is not a procedure or is undefined
Any suggestions?
The situation I have is that since this is a dynamic sql select statement, I can not hard code the variables so that I could do the FETCH TEST_CURSOR INTO ....
Thanks for your time,
I have a dynamically created select statement and store it in VARCHAR2 variable. Now, I need to open and execute it to fetch the values.
DECLARE
...
TYPE cv_type IS REF CURSOR;
TEST_CURSOR cv_type;
...
BEGIN
...
OPEN TEST_CURSOR FOR v_select_string;
I'm good to here but I have not figured out to fetch it. I have tried the FOR testing_cur IN TEST_CURSOR LOOP....END LOOP;
I get the PLS-00221: 'TEST_CURSOR' is not a procedure or is undefined
Any suggestions?
The situation I have is that since this is a dynamic sql select statement, I can not hard code the variables so that I could do the FETCH TEST_CURSOR INTO ....
Thanks for your time,