hi gurus,
I am having a file containing a list of tables.i want to find the count of records inside thes tables.
for this i have to connect into database and i have to put the count for all the tables inside another file i used the following loop once all the tablenames are inside the file.
script :
for line in `cat tablenames`
do
#echo $line
sqlplus -s username/password@dbname << ! > table_count
set lines 1000 pages 0
declare
tab_name varchar2(50);
begin
tab_name:=$line
select count(*) from tab_name;
end;
!
done
but the table_count turns out to be = 0 after this executes....
Can anyone provide me with the correct approach.Its urgent.