Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: PL/SQL - Use bind variable in "from <table>" query
On January 31, 2005 09:05 pm, Lyndon Tiu wrote:
> The code:
>
> ------------
> declare:
>
> v_table_name varchar2
>
> v_value varchar2
>
> begin
>
> select table_name into v_table_name from lookup_table;
>
> select value into v_value from :v_table_name;
>
Slight typo:
select value into v_value from :v_table_name where pk = 1;
PL/SQL compiler complains about bad bind variable :v_table_name.
Thanks.
-- Lyndon Tiu -- http://www.freelists.org/webpage/oracle-lReceived on Tue Feb 01 2005 - 00:11:42 CST
![]() |
![]() |