with tm as
( select t.*, s.psid,
char(case when s.nTables = 1 then ''
when s.nTables > 999 then '****'
else right('****' || strip(char(nTables)), 4)
end, 4) mult
from sysibm.sysTables t, sysibm.systablespace s
where t.type = 'T'
and t.dbName = s.dbName and t.tsname = s.name
)