Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Easy-to-Answer Question from Newbie

Re: Easy-to-Answer Question from Newbie

From: Vladimir M. Zakharychev <bob_at_dpsp-yes.com>
Date: Sat, 4 Jan 2003 15:43:06 +0300
Message-ID: <av6l66$brm$1@babylon.agtel.net>


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...

> 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
Received on Sat Jan 04 2003 - 06:43:06 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US