473,399 Members | 3,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Oracle Discussions

I would like to fetch all table rows count. I am using these strategy -
Create a Cursor to fetch all table name and read one by one. and this fetched result i will send it select statement, but my select statement does not recognize table name. How i achive this result.
Feb 26 '07 #1
3 1248
vijaydiwakar
579 512MB
I would like to fetch all table rows count. I am using these strategy -
Create a Cursor to fetch all table name and read one by one. and this fetched result i will send it select statement, but my select statement does not recognize table name. How i achive this result.
show me thy qry
Feb 27 '07 #2
show me thy qry

you can do it using dynamic sql in the procedure
declare
i number := 0;
j number := 0;
begin
for c in ( select table_name from user_tables ) loop
execute immediate ' select count(*) from '||c.table_name into i;
j := j + 1;
end loop;
dbms_output.put_line(' my total count is '||j);
end;
Mar 2 '07 #3
you can do it using dynamic sql in the procedure
declare
i number := 0;
j number := 0;
begin
for c in ( select table_name from user_tables ) loop
execute immediate ' select count(*) from '||c.table_name into i;
j := j + 1;
end loop;
dbms_output.put_line(' my total count is '||j);
end;
excuse

the script is

declare
i number := 0;
j number := 0;
begin
for c in ( select table_name from user_tables ) loop
execute immediate ' select count(*) from '||c.table_name into i;
j := j + i;
end loop;
dbms_output.put_line(' my total count is '||j);
end;
Mar 2 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: michael newport | last post by:
Oracle opens arms to Mozilla By Stephen Shankland and Alorie Gilbert, CNET News.com Oracle wants its applications to integrate better with Mozilla's open-source desktop software Oracle is...
1
by: Cliff Cooley | last post by:
Can anybody suggest what may be causing the following problem ? I have an ASP script that opens a connection to an Oracle database using a DSN connection string, such as : Set dbConn=...
4
by: Mike D | last post by:
I want to connect to an oracle database from my client pc, OS is win2k or XP. Can I connect to an oracle database without having the full oracle client installed? If so what would be the minimum...
0
by: kamil | last post by:
Hi , I’am having the following strange situation. First let me explain the configuration: Windows 2000 server with sql-server and running reportingservices. HP9000 Unix server with oracle...
5
by: petro | last post by:
Hello all, My asp.net web application works on my machine but I get the following error on our test web server, There is only one oracle home on the test server. Does anyone know how to resolve...
4
by: BookerW | last post by:
I am not sure which forum I should post this on, but here is the problem. I have a front end web application(VB) on asp,net 1.1 framework. Inside of the code, I have the following lines to...
2
by: Ben | last post by:
Hi, I have a problem connecting to Oracle using and ODBC connection in a ASP.Net web page. The TNS Names works fine because when I create a DSN it works, and it works in SQL Plus. Here are...
8
by: =?Utf-8?B?RGF2aWQrKw==?= | last post by:
Hi, I have been developing Web Services in VS2005. Usually I use the built in server in VS2005 to test and develop the Web Service. However I now want to make this Web Service available to...
5
by: =?Utf-8?B?a3VyaXN1dG9mdQ==?= | last post by:
Hello, I have a mdb file(ms access) that connects to an oracle database using a userID and password. Now, I created a software to run this file and excute a query. To be clear, the file has...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.