×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




You can list all your partitions that do not match their table name this
way:
with t1 as (
SELECT SYSTEM_TABLE_SCHEMA, SYSTEM_TABLE_NAME,
count(system_table_member) as Partition_count
from qsys2.syspartitionstat
WHERE system_table_member<>system_table_name
group by
SYSTEM_TABLE_SCHEMA, SYSTEM_TABLE_NAME
having count(system_table_member)=1)
SELECT SYSTEM_TABLE_SCHEMA, SYSTEM_TABLE_NAME, SYSTEM_TABLE_MEMBER,
TABLE_SCHEMA, TABLE_NAME, TABLE_PARTITION
FROM qsys2.syspartitionstat
WHERE (SYSTEM_TABLE_SCHEMA, SYSTEM_TABLE_NAME, SYSTEM_TABLE_MEMBER)
in (select
SYSTEM_TABLE_SCHEMA, SYSTEM_TABLE_NAME, SYSTEM_TABLE_MEMBER
from t1)

The above excludes multi partition tables like QRPGLESRC


Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.