zOs/SQL/CATSIMPL
select char(strip(t.creator) || '.' || strip(t.name), 40) ,
partitions, segSize, s.dbName, s.name
from sysibm.sysTables t, sysibm.systablespace s
where t.type = 'T' and t.dbName = s.dbName and t.tsName = s.name
and t.name = 'ZINSFREQUENZ'
;
x
select * from
( select char(t.name, 30) tb, count(*)cnt , sum(case
when partitions = 0 and segSize = 0 then 1 else 0 end) simp
from sysibm.sysTables t, sysibm.systablespace s
where t.dbName = s.dbName and t.tsName = s.name and s.type <> 'O'
and t.dbName like 'DG%' and t.type = 'T'
group by t.name
) si
where simp > 0 and cnt > 1
order by 3 desc
;
xelect t.name, count(*), sum(
from sysibm.systablespace
where partitions = 0 and segSize = 0 and type <> 'O'
order by name, dbname