Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Dynamic Select query is failing with error "Invalid Table Name"

419290Nov 29 2005 — edited Nov 29 2005
OPEN rc FOR 'SELECT count(*) from :s' USING tab_name;
fetch rc into rec_count;
CLOSE rc;

my requirement is to build dynamic select query to retrieve the total count of rows in each table ( variable tab_name contains the table_name )

But I am getting stuck by this errror, not sure if there is any alternative !

ORA-00903: invalid table name
ORA-06512: at line 43
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 27 2005
Added on Nov 29 2005
3 comments
651 views