1

I have a procedure that have to select from different tables according to a input parameter. Input parameter select the table I have to query. Actually I have a static situation.

CURSOR c IS SELECT ... FROM TBL;
BEGIN
FOR idx IN c LOOP
....
END LOOP;

Is there a way to change cursor query definition at run time

3
  • 1
    Possible duplicate of Dynamic SQL LOOP Commented Mar 16, 2017 at 14:03
  • 1
    Is it just the table name which changes or do you want to change the columns in the projection as well? Commented Mar 16, 2017 at 14:23
  • For now I solved using the EXECUTE IMMEDIATE .... USING. So Commented Mar 22, 2017 at 15:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.