View previous topic :: View next topic |
Author |
Message |
zefrim Beginner
Joined: 29 Jun 2006 Posts: 22 Topics: 19
|
Posted: Mon Aug 21, 2006 8:25 am Post subject: SQL for Db2 Z.OS / Version 8.1/ |
|
|
Hi all,
perhaps somebody can help me:
i want to show all tables with the sum of the indices per table
and those all in one SQL-Stmt.
Example:
" SELECT creator,name ,"sum(ix)" from sysibm.systables where creator like 'SAPR3%"
RESULT:
creator NAME SUM-INCODES
SAPR3 ATAB 02
SAPR3 DLIB01 13
SAPR3 TECHNX 0
.
.
.
How looks this SQL-Stmt ?
Thanks
Zefrim |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon Aug 21, 2006 10:17 am Post subject: |
|
|
zefrim,
The information you are looking is available in sysibm.sysindexes DB2 catalog table.
try this sql
Code: |
SELECT CREATOR
,TBNAME
,COUNT(INDEXSPACE)
FROM SYSIBM.SYSINDEXES
GROUP BY CREATOR,TBNAME
|
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
zefrim Beginner
Joined: 29 Jun 2006 Posts: 22 Topics: 19
|
Posted: Wed Aug 23, 2006 1:53 am Post subject: |
|
|
thanks it works |
|
Back to top |
|
 |
|
|