[Home] [Help]
SELECT distinct ood.organization_id, ood.organization_name, ood.organization_code || ':' || ood.organization_name, blev.id, blev.value, blev.value, null, null, null, null, null FROM (select distinct mod.organization_id,mod.organization_name, mod.organization_code,mod.legal_entity from msd_organization_definitions mod, msd_app_instance_orgs orgs WHERE mod.organization_id = orgs.organization_id) ood, (select distinct id,value from msd_legal_entities_v) blev WHERE blev.id = ood.legal_entity /*union select msd_sr_util.get_null_pk , msd_sr_util.get_null_desc, msd_sr_util.get_null_desc, msd_sr_util.get_null_pk , msd_sr_util.get_null_desc, msd_sr_util.get_null_desc, null, null, null, null, null from dual*/
SELECT DISTINCT OOD.ORGANIZATION_ID
, OOD.ORGANIZATION_NAME
, OOD.ORGANIZATION_CODE || ':' || OOD.ORGANIZATION_NAME
, BLEV.ID
, BLEV.VALUE
, BLEV.VALUE
, NULL
, NULL
, NULL
, NULL
, NULL
FROM (SELECT DISTINCT MOD.ORGANIZATION_ID
, MOD.ORGANIZATION_NAME
, MOD.ORGANIZATION_CODE
, MOD.LEGAL_ENTITY
FROM MSD_ORGANIZATION_DEFINITIONS MOD
, MSD_APP_INSTANCE_ORGS ORGS
WHERE MOD.ORGANIZATION_ID = ORGS.ORGANIZATION_ID) OOD
, (SELECT DISTINCT ID
, VALUE
FROM MSD_LEGAL_ENTITIES_V) BLEV
WHERE BLEV.ID = OOD.LEGAL_ENTITY /*UNION SELECT MSD_SR_UTIL.GET_NULL_PK
, MSD_SR_UTIL.GET_NULL_DESC
, MSD_SR_UTIL.GET_NULL_DESC
, MSD_SR_UTIL.GET_NULL_PK
, MSD_SR_UTIL.GET_NULL_DESC
, MSD_SR_UTIL.GET_NULL_DESC
, NULL
, NULL
, NULL
, NULL
, NULL
FROM DUAL*/
|
|
|
|