Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to do for x in (v_sql) sql as a variable

Stevo-6112Apr 21 2016 — edited Apr 28 2016

Is it possible to have the sql statement in a variable and pass it to for loop such as this? Ultimately trying to pass in sql query to a procedure and have it processed.

v_sql = "select * from table";

for x in (v_sql) loop

end loop;

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 26 2016
Added on Apr 21 2016
21 comments
1,217 views