Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Easy-to-Answer Question from Newbie
try
declare
query_table_name VARCHAR2(32) := 'SYS.V_$SESSION';
begin
execute immediate 'select * from '||query_table_name;
end;
/
-- Niall Litchfield Oracle DBA Audit Commission UK ***************************************** Please include version and platform and SQL where applicable It makes life easier and increases the likelihood of a good answer ****************************************** "Joe" <jdog10001_at_hotmail.com> wrote in message news:f48de37.0301031315.46a148b9_at_posting.google.com...Received on Fri Jan 03 2003 - 15:33:55 CST
> Is there an easy way to correct this problem without hardcoding the
> value in the SELECT statement or passing the value in as a parameter?
>
>
>
> declare
> query_table_name VARCHAR2(32) := 'SYS.V_$SESSION';
> begin
> select * from query_table_name;
> end;
> /
>
>
> =======================================
> ORA-06550: line 4, column 17:
> PLS-00201: identifier 'QUERY_TABLE_NAME' must be declared
> ORA-06550: line 4, column 3:
> PL/SQL: SQL Statement ignored
![]() |
![]() |