SQL Query to Retrieve Parent Department Tree Information

Detailed Description:

The SQL query below fetches tree version and structure details for department hierarchies configured under the PER_DEPT_TREE_STRUCTURE:

 

SELECT DISTINCT 
    B.tree_version_id, 
    B.tree_structure_code, 
    B.tree_code 
FROM   
    fnd_tree_version A, 
    per_dept_tree_node B 
WHERE  
    A.status = 'ACTIVE' 
    AND B.tree_structure_code = 'PER_DEPT_TREE_STRUCTURE' 
    AND A.tree_version_id = B.tree_version_id

I hope this blog post was helpful for you. If you have any questions or feedback, please leave a comment below.

SQL Queries (SQLQ)
Posted by : Mohammad