Home » Applications » Oracle Fusion Apps & E-Business Suite » hierarchy query
hierarchy query [message #325847] Mon, 09 June 2008 03:22 Go to next message
hany_marawan
Messages: 198
Registered: April 2005
Location: Cairo - Egypt
Senior Member
Hello,
I wrote this query to give me the hierarchy of the company but it gave me "internal error code, arguments".
what's the problem and the solution.

select e.ORGANIZATION_ID_PARENT,
(select name from HR_ORGANIZATION_UNITS_V where ORGANIZATION_ID=e.ORGANIZATION_ID_PARENT)parent_name,
v1.ORGANIZATION_ID,V1.NAME
from per_org_structure_elements E,HR_ORGANIZATION_UNITS_V V1
where E.ORGANIZATION_ID_CHILD=V1.ORGANIZATION_ID
start with ORGANIZATION_ID_PARENT=1571
connect by prior e.ORGANIZATION_ID_PARENT=v1.ORGANIZATION_ID


Thanks
Re: hierarchy query [message #328884 is a reply to message #325847] Mon, 23 June 2008 04:20 Go to previous message
cjack
Messages: 22
Registered: June 2008
Junior Member
I tested the script you pasted, It work fine in my site, I guess the sub-query "SELECT NAME
FROM hr_organization_units_v
WHERE organization_id = e.organization_id_parent" maybe return duplicate record, so raise the error.
Previous Topic: Oracle Newbie
Next Topic: PDF Report in Cyrillic Characters
Goto Forum:
  


Current Time: Fri Jun 28 23:29:03 CDT 2024