Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Easy-to-Answer Question from Newbie
Don't see why you want to do it this way. What do you want to achieve?
You do a SELECT in a PL/SQL block - and where you expect the result
set to go? In PL/SQL, you don't do things this way. You either SELECT
INTO (for single row queries), or you declare a cursor, open it and
fetch from it in a loop. Please explain what you're trying to do and I am
sure we will be able to show you the right way to do it.
-- Vladimir Zakharychev (bob@dpsp-yes.com) http://www.dpsp-yes.com Dynamic PSP(tm) - the first true RAD toolkit for Oracle-based internet applications. All opinions are mine and do not necessarily go in line with those of my employer. "Joe" <jdog10001_at_hotmail.com> wrote in message news:f48de37.0301031315.46a148b9_at_posting.google.com...Received on Sat Jan 04 2003 - 06:43:06 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