select t.dept_cd,t.dept_name,t.up_dept_cd from DM_DS.TDS_COMP_DEPT t connect by t.up_dept_cd = prior t.dept_cd start with t.up_dept_cd=20