Oracle Fusion - SQL Query for Business Units
|
1 min read
General
This is an Oracle Fusion SQL Query returning the list of the active Business Units.
Query
select
ORGANIZATION_ID,
NAME
FROM
hr_operating_units
OR
SELECT ORG.ORGANIZATION_ID BU_ID,
ORG.NAME BU_NAME
FROM HR_ALL_ORGANIZATION_UNITS_F_VL ORG
, HR_ORG_UNIT_CLASSIFICATIONS_X CLS
, HR_ORGANIZATION_INFORMATION_X INFO
WHERE CLS.ORGANIZATION_ID = ORG.ORGANIZATION_ID
AND CLS.CLASSIFICATION_CODE = 'FUN_BUSINESS_UNIT'
AND INFO.ORGANIZATION_ID = ORG.ORGANIZATION_ID
AND INFO.ORG_INFORMATION_CONTEXT = CLS.CLASSIFICATION_CODE
AND TRUNC(SYSDATE) BETWEEN ORG.EFFECTIVE_START_DATE AND ORG.EFFECTIVE_END_DATE
AND STATUS = 'A'