Join the OracleApps88 Telegram group @OracleApps88to get more information on Oracle EBS R12/Oracle Fusion applications.

If you are facing any issues while copying the Code/Script or any issues with Posts, Please send a mail to OracleApp88@Yahoo.com or message me at @apps88 or +91 905 957 4321 in telegram.

Wednesday, September 26, 2018

Query to Get Project Tasks Hierarchy Structure in Oracle

SELECT
 pt.task_id
 ,pt.task_number
 ,LEVEL Task_path_level
 ,LPAD (' ',10 * (LEVEL - 1))||pt.task_number TASK_NUM_path
 ,SYS_CONNECT_BY_PATH (pt.task_id, '\') path
FROM pa_tasks pt
WHERE 1=1
  and pt.project_id = <P_PROJECT_ID/P_TEMPLATE_ID>
START WITH pt.parent_task_id is null
CONNECT BY PRIOR pt.task_id = pt.parent_task_id

ORDER BY PATH

No comments:

Post a Comment

If you are facing any issues while copying the Code/Script or any issues with Posts, Please send a mail to OracleApp88@Yahoo.com or message me at @apps88 or +91 905 957 4321 in telegram.
Best Blogger TipsGet Flower Effect