- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: SQL or PLSQL program for getting count(*) of t...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-16-2002 01:32 AM
тАО07-16-2002 01:32 AM
I am planning to keep all the count(*) figures for all my tables to a statistic table. Any idea for using SQL or PLSQL to do this ??
Cheers,
Chris,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-16-2002 03:39 AM
тАО07-16-2002 03:39 AM
Re: SQL or PLSQL program for getting count(*) of tables !!
This member has assigned points to 93 of 164 responses to his/her questions.
http://forums.itrc.hp.com/cm/TopSolutions/1,,CA721374!1!questions,00.html
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-16-2002 09:51 AM
тАО07-16-2002 09:51 AM
Re: SQL or PLSQL program for getting count(*) of tables !!
the basic idea usually is to write a SQL script which creates the SQL script you want, and then start it.
Something like
connect internal
set termout off
set feedback off
spool /tmp/count.sql
select 'select count(*) from ' || TABLE_NAME || ';' "rem cmd"
from DBA_TABLES;
spool off;
start /tmp/count.sql
HTH,
Wodisch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-16-2002 02:22 PM
тАО07-16-2002 02:22 PM
Solution------
declare
cursor tablelist is select table_name from user_tables;
tabname varchar2(40);
sqlstatement varchar2(200);
numcount varchar2(20);
begin
open tablelist;
loop
fetch tablelist into tabname;
exit when tablelist%NOTFOUND;
sqlstatement:='select count(*) from '||tabname;
execute immediate sqlstatement into numcount;
insert into stat_table values (tabname,sysdate,numcount);
end loop;
end;
/
-----------
Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-16-2002 03:16 PM
тАО07-16-2002 03:16 PM
Re: SQL or PLSQL program for getting count(*) of tables !!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-16-2002 07:10 PM
тАО07-16-2002 07:10 PM
Re: SQL or PLSQL program for getting count(*) of tables !!
Honestly, I am not quite aware to give points in HP forums in my past few years!! However, you can check my recent records, among the recent 6 months+, I always give points to those who answer my questions.
I really appreciate you guys spend time and effort to help me. That's the process for me to grow up, to be mature and to be fair for others.
Please be fair to me and don't just count on me in the "PAST"
Chris,