table name substitution in pl/sql
From: Suresh <sureshcb_at_yahoo.com>
Date: 1 Oct 2003 14:22:18 -0700
Message-ID: <2af7b65c.0310011322.43ad7aaf_at_posting.google.com>
Date: 1 Oct 2003 14:22:18 -0700
Message-ID: <2af7b65c.0310011322.43ad7aaf_at_posting.google.com>
how can we use a variable in the place of a tablename?
towner=scott
ERROR at line 18:
I need to substitute different table names. How do I pass variable
names as table names? Towner and ttable_names are declared in the
declare section.
ttable_name=emp
select count(*) into totrows from towner.ttable_name;
ORA-06550: line 18, column 49:
PLS-00201: identifier 'TOWNER.TTABLE_NAME' must be declared
ORA-06550: line 18, column 15:
PL/SQL: SQL Statement ignored
Thanks
Suresh Received on Wed Oct 01 2003 - 23:22:18 CEST