Oracle ERP 各廠的線上人數

在 Oracle ERP 中, 可用下面語法得知 "各廠的線上人數" :
 程式碼
SELECT HOU.ORGANIZATION_ID
, HOU.NAME ORGANIZATION_NAME
, COUNT(*) ONLINE_NUM
FROM (SELECT DISTINCT
RESPONSIBILITY_ID
, USER_ID
FROM FND_SIGNON_AUDIT_VIEW
) A
, ORG_ACCESS OA
, HR_ALL_ORGANIZATION_UNITS_TL HOU
WHERE A.RESPONSIBILITY_ID = OA.RESPONSIBILITY_ID(+)
AND OA.ORGANIZATION_ID = HOU.ORGANIZATION_ID(+)
GROUP BY HOU.NAME, HOU.ORGANIZATION_ID;
天聖經:神的心不僅在神的聖言當中,也在神所創造的萬物之中,天涯海角每一處都有神的心
Related Posts Plugin for WordPress, Blogger...