PL/SQL (MOSC)

MOSC Banner

Getting a variable to be recognized in a loop

edited Jun 1, 2011 2:46AM in PL/SQL (MOSC) 8 commentsAnswered
 Hello, I am stumped regarding a simple plsql program I'm trying to write. 

I want to write a plsql program that produces a basic report.  The report would display the list of all our tables in the datbased followed by their row count.

For example:

Table A  1000
Table B  12
Table C  187
"
etc...

"

Below is the code I used.  The main cursor works great but I'm having an issue with this line being executed within the loop:

 select count(*) into num_of_rows from table_name_rec.table_name ;

The last part of the above statement "table_name_rec.table_name" isn't being recognized.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center