473,396 Members | 2,033 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,396 software developers and data experts.

Simple Query Questions

8
I just got the following questions

Q1. How can I create a list of tables in LETMAP with the row counts of each?

Q2. How can I get the database LETMAP's space? and the each table's space in LETMAP?

LETMAP is database name.

For Q1, I tried to use
db2 "select tabschema, tabname, (select count(*) from tabschema.tabname) from syscat.tables"

When I execute this command, it comes with the error message said,
SQL0204N "tabschema.tabname" is an undefined name.

I know the problem is happened on the part of (select count(*) from tabschema.tabname).
How can I modify my query?

Can I add something in the above query for the Q2 at same time? Or any idea that I can get Q2's information?

Thanks a lot.
Apr 17 '07 #1
1 1886
kalexin
20
I just got the following questions

Q1. How can I create a list of tables in LETMAP with the row counts of each?

Q2. How can I get the database LETMAP's space? and the each table's space in LETMAP?

LETMAP is database name.

For Q1, I tried to use
db2 "select tabschema, tabname, (select count(*) from tabschema.tabname) from syscat.tables"

When I execute this command, it comes with the error message said,
SQL0204N "tabschema.tabname" is an undefined name.

I know the problem is happened on the part of (select count(*) from tabschema.tabname).
How can I modify my query?

Can I add something in the above query for the Q2 at same time? Or any idea that I can get Q2's information?

Thanks a lot.

The way I would do it is to create a stored procedure to receive table name and schema name as inputs and then return the table row count as ouput.
Invoke this stored procedure from the query that selects from syscat
Apr 18 '07 #2

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

Similar topics

3
by: Patchwork | last post by:
Hi Everyone, Please take a look at the following (simple and fun) program: //////////////////////////////////////////////////////////////////////////// ///////////// // Monster Munch, example...
1
by: Stefan V. | last post by:
Hello! I am trying to convert a query written for SQL Server 2000 database tables, to a MS Access query. Here is what I have in SQL Server: SELECT t2.*, CASE WHEN t2.QType = '3' THEN...
14
by: alwayshouston | last post by:
Hi All! I am working on this very small database and I am confused in the designing a simple form. I only have three tables in the database. First Table: tblExpense Columns: ExpenseID ;...
7
by: serge | last post by:
How can I run a single SP by asking multiple sales question either by using the logical operator AND for all the questions; or using the logical operator OR for all the questions. So it's always...
27
by: one man army | last post by:
Hi All- I am new to PHP. I found FAQTS and the php manual. I am trying this sequence, but getting 'no zip string found:'... PHP Version 4.4.0 $doc = new DomDocument; $res =...
7
by: Ivan Marsh | last post by:
Hey Folks, I'm having a heck of a time wrapping mind around AJAX. Anyone know of a simple, straight-forward example for pulling a simple query from mysql with PHP using AJAX? As I...
4
by: kidneybean | last post by:
I'm getting "Error 1109 : Unknown table 'questions' in where clause" when I do the simplest query. This is the query: SELECT * FROM questions; My database has the following two tables: ...
4
by: yogesh | last post by:
mysql in c++ initialize error occurs a simple program is executed in redhat9.0 , using gcc 3.2.2 compiler version ... #include <stdio.h> #include <mysql.h> #include <string.h> int main() {
7
by: javedna | last post by:
Hi guys Ive got a simple problem, im designing an online questionnaire and on submission the coding that I have used to validate whether a user has filled in all the questions is supposed to...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.