Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> [PL/SQL] Help - Select into from a variable tablename?
I need some help selecting into from a variable tablename. Example:
Procedure CountTable(tbl char) is
cnt number;
BEGIN
select count(*) into cnt from tbl; dbms_output.put_line (tbl || ' ' || cnt);end;
PL/SQL interprets tbl as an existing table and fails. I would like to have a loop call this routine for each table in a user's schema yielding these results:
Tablename Cnt --------- --- TABLE1 234 TABLE2 823
Any ideas? Thanks in advance.
--David H. Received on Sat Apr 19 1997 - 00:00:00 CDT