Dear all ,
I am making procedure to analyze tables of a user by selecting from
dba_tables. It is working ok when I run code from sql*plus as anonyms
block .
SQL> ed
Wrote file afiedt.buf
1 declare
2 cursor c1 is select table_name from dba_tables where owner='SCOTT';
3 begin
4 for c1rec in c1 loop
5 dbms_output.put_line(c1rec.table_name);
6 end loop;
7* end;
SQL> /
BONUS
CLIENT_MASTER
CUSTOMER
CUSTOMERS
PL/SQL procedure successfully completed.
But when I am making a named procedure ( ie; create procedure abc as
............) from same code , it is giving error "ORA-00942 : TABLE OR
VIEW DOES NOT EXIST " for dba_tables in the cursor .
Is it a oracle bug or anything missing.
regds,
mks
Oracle LazyDBA home page