You do may pass those variables to sql*plus as substituting variables if you know at least the number of selected columns. In pl/sql you may build your select statement and execute it via dynamic sql. You may use dbms_sql package, it will work on Oracle 7+. If you're on 8.1.6+ try to open a cursor for your string (varchar2) statement.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.