Our developers need the ability to identify the columns that are components of a superdescriptor. They want to be able to do a select against the connx schema to list all the superdescriptors of a table together with all of the components columns that made up each of the super.
I see table_indexes and syscnxStatistics but none would allow me to provide the information that the developers need.
This information is available in the data dictionary viewer utility (not to be confused with the data dictionary administrator). Please have the developer use this to view the superdescriptors and all the columns that make up each superdescriptor.
FROM
INFORMATION_SCHEMA.TABLE_INDEXES TIDX
,INFORMATION_SCHEMA.KEY_COLUMN_USAGE KCUS
WHERE
TIDX.TABLE_CATALOG = ‘ADA201’
AND TIDX.TABLE_SCHEMA = ‘FD’
AND TIDX.TABLE_NAME = ‘BELEG’
AND TIDX.SHORT_NAME = ‘AO’
*
AND KCUS.CONSTRAINT_CATALOG = TIDX.TABLE_CATALOG
AND KCUS.CONSTRAINT_SCHEMA = TIDX.TABLE_SCHEMA
AND KCUS.TABLE_NAME = TIDX.TABLE_NAME
ORDER BY ORDINAL_POSITION
I was able to get all involved columns, but I get more records than expected.
Maybe the problem is that we do not import SPDs as named columns in the CDD.
I guess this is the reason that the column KCUS.CONSTRAINT_NAME holds no values in our environment.
Larry may give an advice whether the retrieval of the information_schema is an alternative approach.