[Home] [Help]
SELECT locf.inventory_location_id, locf.organization_id, locf. subinventory_code, locf.subinventory_code||'-'||mp.organization_code||'-'||inst.instance_code FROM mtl_item_locations_kfv locf, mtl_parameters mp, edw_local_instance inst WHERE locf.organization_id = mp.organization_id AND (locf.physical_location_id = locf.inventory_location_id OR locf.physical_location_id is NULL) UNION ALL SELECT -1, sub.organization_id, sub.secondary_inventory_name, 'null_locator'||'-'||sub.secondary_inventory_name||'-'||mp.organization_code||'-'||inst.instance_code FROM mtl_secondary_inventories sub, mtl_parameters mp, edw_local_instance inst WHERE sub.organization_id = mp.organization_id
SELECT LOCF.INVENTORY_LOCATION_ID
, LOCF.ORGANIZATION_ID
, LOCF. SUBINVENTORY_CODE
, LOCF.SUBINVENTORY_CODE||'-'||MP.ORGANIZATION_CODE||'-'||INST.INSTANCE_CODE
FROM MTL_ITEM_LOCATIONS_KFV LOCF
, MTL_PARAMETERS MP
, EDW_LOCAL_INSTANCE INST
WHERE LOCF.ORGANIZATION_ID = MP.ORGANIZATION_ID
AND (LOCF.PHYSICAL_LOCATION_ID = LOCF.INVENTORY_LOCATION_ID OR LOCF.PHYSICAL_LOCATION_ID IS NULL) UNION ALL SELECT -1
, SUB.ORGANIZATION_ID
, SUB.SECONDARY_INVENTORY_NAME
, 'NULL_LOCATOR'||'-'||SUB.SECONDARY_INVENTORY_NAME||'-'||MP.ORGANIZATION_CODE||'-'||INST.INSTANCE_CODE
FROM MTL_SECONDARY_INVENTORIES SUB
, MTL_PARAMETERS MP
, EDW_LOCAL_INSTANCE INST
WHERE SUB.ORGANIZATION_ID = MP.ORGANIZATION_ID
|
|
|
|