Friday 19 July 2013

Find records in a PeopleSoft Component



SELECT DISTINCT (recname) FROM psrecdefn
WHERE 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.subpnlname)
AND a.pnlgrpname = 'specify your component 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.subpnlname )
AND a.pnlgrpname = 'specify your component name') )
AND recname <> ' ')
AND rectype in ('0')  -- specify record type, default is 0 for table
--AND rectype in ('0', '1', '2')  -- specify all types
ORDER BY recname ASC

No comments:

Post a Comment