Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> PL/SQL variables in the "from" part of a select statement
Does anyone know if it is possible to access a variable in the "from
table" section of a query?
I have the following code (not exact)
DECLARE
local_var VARCHAR2(30);
count1 NUMBER;
CURSOR list_tables is
select table_name from all tables;
BEGIN
open list_tables;
LOOP
FETCH list_tables INTO local_var;
select count(*) into count1 from local_var;
Error resulting is:
ORA-06550: line .......
PLS-00201: identifier 'LOCAL_VAR' must be declared.
Any suggestions??
Thanks. Received on Fri Nov 22 2002 - 11:06:29 CST