How can I do lexical parameter in PL/SQL like :
select :x,:y from emp;
however we do that in SQL :
select &x,&y from emp;
The PL/SQL dose'nt consider x and y as filds just as string!!
Please, help me to do that.
thanks..
Printable View
How can I do lexical parameter in PL/SQL like :
select :x,:y from emp;
however we do that in SQL :
select &x,&y from emp;
The PL/SQL dose'nt consider x and y as filds just as string!!
Please, help me to do that.
thanks..
you will have to use dynamic sql to acomplish this. Hopefully, you are on 8.1.x. Check out:
http://www.oracle.com/oramag/oracle/...ml?o60sql.html
http://www.oracle.com/oramag/oracle/...ml?o11sql.html
http://www.oracle.com/oramag/oracle/...ml?o21sql.html
Thanks,
but I use Oracle 7.
I can't use EXECUTE IMMIDATE
You can use dynamic sql in your application using dbms_sql package.