0% found this document useful (0 votes)
97 views2 pages

All Records Associated With A Component

This SQL query retrieves all records associated with a PeopleSoft component by querying multiple tables to get record names and types. It handles components with multiple pages and records to avoid overlooking any. The second SQL provided returns additional details on the component name, market, each record name and its description and type.

Uploaded by

iceyroses
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
97 views2 pages

All Records Associated With A Component

This SQL query retrieves all records associated with a PeopleSoft component by querying multiple tables to get record names and types. It handles components with multiple pages and records to avoid overlooking any. The second SQL provided returns additional details on the component name, market, each record name and its description and type.

Uploaded by

iceyroses
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Sometimes, I have had the necessity to find all the records that form part of a PeopleSoft

component. I had to pass these records into other SQL queries to get certain information. For
components, with multiple pages and records chances are that I would overlook upon one or two
records. Hence, I wrote this SQL query to fetch all the records associated with a component.

SELECT R.RECNAME AS RECORD_NAME,


( CASE
WHEN R.RECTYPE = 0 THEN 'Table'
WHEN R.RECTYPE = 1 THEN 'View'
WHEN R.RECTYPE = 2 THEN 'Derived'
WHEN R.RECTYPE = 3 THEN 'Sub Record'
WHEN R.RECTYPE = 5 THEN 'Dynamic View'
WHEN R.RECTYPE = 6 THEN 'Query View'
WHEN R.RECTYPE = 7 THEN 'Temporary Table'
ELSE 'Unknown'
END ) AS RECORD_TYPE
FROM PSRECDEFN R
WHERE R.RECNAME IN (SELECT DISTINCT RECNAME
FROM PSPNLFIELD
WHERE PNLNAME IN (SELECT DISTINCT B.PNLNAME
FROM PSPNLGROUP A,
PSPNLFIELD B
WHERE ( A.PNLNAME = B.PNLNAME
OR A.PNLNAME = B.SUBPNLNA
ME )
AND A.PNLGRPNAME=:1 --Comp Name
AND RECNAME <> ' ')
UNION
SELECT DISTINCT RECNAME
FROM PSPNLFIELD
WHERE PNLNAME IN (SELECT DISTINCT B.SUBPNLNAME
FROM PSPNLGROUP A,
PSPNLFIELD B
WHERE ( A.PNLNAME = B.PNLNAME
OR A.PNLNAME = B.SUBPNLNA
ME )
AND A.PNLGRPNAME=:1--Comp Name))
AND R.RECNAME <> ' '
ORDER BY R.RECTYPE ;

Another SQL query is below which gives the component name, market, record name with its
record type and description:
SELECT DISTINCT p.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 = :1 -- Comp Name 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;

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy