DBA Data[Home] [Help]

VIEW: APPS.JAI_CMN_ORG_DTLS_V

Source

View Text - Preformatted

SELECT jhr.ec_code EC_CODE, org.Organization_code ORAGNIZATION_CODE, org.organization_name ORGANIZATION_NAME, org.organization_id ORGANIZATION_ID, hrl.location_code LOCATION_CODE, 'Manufacturing' ORGTYPE FROM JAI_CMN_INVENTORY_ORGS jhr, org_organization_definitions org, hr_locations hrl WHERE jhr.organization_id = org.organization_id AND jhr.location_id = hrl.location_id(+) AND nvl(master_org_flag,'N')='Y' AND nvl(manufacturing,'N')='Y' AND nvl(trading,'N')='N' AND ec_code IS NOT NULL UNION ALL SELECT jhr.tr_ec_code EC_CODE, org.Organization_code ORGANIZATION_CODE, org.organization_name ORGANIZATION_NAME, org.organization_id ORGANIZATION_ID, hrl.location_code LOCATION_CODE, 'Trading' ORGTYPE FROM JAI_CMN_INVENTORY_ORGS jhr, org_organization_definitions org, hr_locations hrl WHERE jhr.organization_id = org.organization_id AND jhr.location_id = hrl.location_id(+) AND nvl(master_org_flag,'N')='Y' AND nvl(manufacturing,'N')='N' AND nvl(trading,'N')='Y' AND tr_ec_code IS NOT NULL
View Text - HTML Formatted

SELECT JHR.EC_CODE EC_CODE
, ORG.ORGANIZATION_CODE ORAGNIZATION_CODE
, ORG.ORGANIZATION_NAME ORGANIZATION_NAME
, ORG.ORGANIZATION_ID ORGANIZATION_ID
, HRL.LOCATION_CODE LOCATION_CODE
, 'MANUFACTURING' ORGTYPE
FROM JAI_CMN_INVENTORY_ORGS JHR
, ORG_ORGANIZATION_DEFINITIONS ORG
, HR_LOCATIONS HRL
WHERE JHR.ORGANIZATION_ID = ORG.ORGANIZATION_ID
AND JHR.LOCATION_ID = HRL.LOCATION_ID(+)
AND NVL(MASTER_ORG_FLAG
, 'N')='Y'
AND NVL(MANUFACTURING
, 'N')='Y'
AND NVL(TRADING
, 'N')='N'
AND EC_CODE IS NOT NULL UNION ALL SELECT JHR.TR_EC_CODE EC_CODE
, ORG.ORGANIZATION_CODE ORGANIZATION_CODE
, ORG.ORGANIZATION_NAME ORGANIZATION_NAME
, ORG.ORGANIZATION_ID ORGANIZATION_ID
, HRL.LOCATION_CODE LOCATION_CODE
, 'TRADING' ORGTYPE
FROM JAI_CMN_INVENTORY_ORGS JHR
, ORG_ORGANIZATION_DEFINITIONS ORG
, HR_LOCATIONS HRL
WHERE JHR.ORGANIZATION_ID = ORG.ORGANIZATION_ID
AND JHR.LOCATION_ID = HRL.LOCATION_ID(+)
AND NVL(MASTER_ORG_FLAG
, 'N')='Y'
AND NVL(MANUFACTURING
, 'N')='N'
AND NVL(TRADING
, 'N')='Y'
AND TR_EC_CODE IS NOT NULL