We are using the following to retrieve parent child:
[code=oracle]
Cursor get_child_org is
SELECT distinct
o.ORG_ORGANIZAT ION_ID org_id,
o.name belongs_to,
uic.code org_uic,
SYS_CONNECT_BY_ PATH(o.name, ' - ') "ORG_STRUCT URE"
FROM ORG_ORGANIZATIO NS o,
org_uic uic
WHERE o.org_organizat ion_id = uic.org_organiz ation_id(+)
START WITH o.org_organizat ion_id = vParent_id
CONNECT BY PRIOR o.org_organizat ion_id = o.owner_organiz ation_id
Order By ORG_STRUCTURE
;
[/code]
Is there a method to count the parent child level? I would like to return a count to indicate the level versus the parent child path by appending hyphens '-'.
[code=oracle]
Cursor get_child_org is
SELECT distinct
o.ORG_ORGANIZAT ION_ID org_id,
o.name belongs_to,
uic.code org_uic,
SYS_CONNECT_BY_ PATH(o.name, ' - ') "ORG_STRUCT URE"
FROM ORG_ORGANIZATIO NS o,
org_uic uic
WHERE o.org_organizat ion_id = uic.org_organiz ation_id(+)
START WITH o.org_organizat ion_id = vParent_id
CONNECT BY PRIOR o.org_organizat ion_id = o.owner_organiz ation_id
Order By ORG_STRUCTURE
;
[/code]
Is there a method to count the parent child level? I would like to return a count to indicate the level versus the parent child path by appending hyphens '-'.
Comment