取得某個 USER 的所有 Supervisor

在 Oracle ERP 中, 如何取得某個 User, 他的 "所有 Employee Supervisor" 是誰, 這些 Supervisor 對應的 User Name 是什麼 ?

可以利用 Oracle Treeview 語法得知.

語法, 如下 :
 語法
SELECT FU.USER_NAME
FROM FND_USER FU
, (SELECT SUPERVISOR_ID
FROM PER_ALL_ASSIGNMENTS_F
WHERE SUPERVISOR_ID IS NOT NULL
START WITH PERSON_ID = (SELECT EMPLOYEE_ID
FROM FND_USER
WHERE USER_NAME = UPPER('&USER_NAME')
)
CONNECT BY PRIOR SUPERVISOR_ID = PERSON_ID
) EMP
WHERE FU.EMPLOYEE_ID = EMP.SUPERVISOR_ID;
Related Posts Plugin for WordPress, Blogger...