Querying the Component

Here are some queries to find things out about the component.

This one is a simple list of all the fields in the component (doesn’t take into account subpages, etc):

SELECT CP.PNLGRPNAME, CP.MARKET, CP.DESCR,
           CPG.PNLNAME, CPG.ITEMLABEL,
           PG.DESCR,
           PGF.FIELDTYPE, PGF.LBLTEXT, PGF.RECNAME, PGF.FIELDNAME
FROM PSPNLGRPDEFN CP,
         PSPNLGROUP CPG,
         PSPNLDEFN PG,
         PSPNLFIELD PGF
WHERE CP.PNLGRPNAME = 'JOB_DATA'
     AND CP.MARKET = 'GBL'
    AND CP.PNLGRPNAME = CPG.PNLGRPNAME
    AND CP.MARKET = CP.MARKET
    AND PG.PNLNAME = CPG.PNLNAME
    AND PGF.PNLNAME = PG.PNLNAME;

This one shows just the records involved:

SELECT DISTINCT CP.PNLGRPNAME, CP.MARKET, CP.DESCR,  PGF.RECNAME, R.RECDESCR, R.RECTYPE
FROM PSPNLGRPDEFN CP,
         PSPNLGROUP CPG,
         PSPNLDEFN PG,
         PSPNLFIELD PGF,
         PSRECDEFN R
WHERE CP.PNLGRPNAME = 'JOB_DATA'
     AND CP.MARKET = 'GBL'
    AND CP.PNLGRPNAME = CPG.PNLGRPNAME
    AND CP.MARKET = CP.MARKET
    AND PG.PNLNAME = CPG.PNLNAME
    AND PGF.PNLNAME = PG.PNLNAME
    AND PGF.RECNAME = R.RECNAME;

I hope this helps.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.