DIRECT AND INDIRECT CHILD RECORD IN PEOPLESOFT

Below SQL will return all the records that have PER_ORG_ASGN as parent record in record properties in Application Designer.
 
select RECNAME from PSRECDEFN  where PARENTRECNAME = 'PER_ORG_ASGN'
 
Apart from the above direct child records, we will also be interested to know indirect child records. For example PER_ORG_ASGN is parent of JOB and JOB is parent of JOB_JR. To understand the complete hierarchy (i.e) direct and indirect child records, you can use the below SQL.


select ltrim(C.ChildPath,' > ') "Parent > Child" from
(select RECNAME,PARENTRECNAME,SYS_CONNECT_BY_PATH(RECNAME, '  > ') as ChildPath
from PSRECDEFN
start with RECNAME = 'PER_ORG_ASGN'
connect by PRIOR RECNAME = PARENTRECNAME) C
where RECNAME <> 'PER_ORG_ASGN