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