0

1.主要代码:

SELECT
  iodv.organization_id,
  iodv.organization_name,
  mil.SUBINVENTORY_CODE subinventory_name,
  mil.inventory_location_id locator_id,
  mil.segment11 || '.' || mil.segment12 || '.' || mil.segment13 locator_name
FROM
  inv_item_locations mil,
  inv_organization_definitions_v iodv
WHERE
  1 = 1
  and iodv.organization_id = mil.organization_id
  and iodv.Organization_Code = ':Organizations'
  and mil.SUBINVENTORY_CODE = ':p_Subinventories'
  1. 参数 p_SubInventories:
select
distinct
iil.Subinventory_code
from 
inv_item_locations iil,
INV_ORG_PARAMETERS iop
where 
1=1
and iil.ORGANIZATION_ID=iop.ORGANIZATION_ID
and iop.ORGANIZATION_CODE= :Organizations
  1. 组织参数:
select distinct organization_code from inv_org_parameters

无法在 Data Model @Oracle BI Publisher 中使用上述查询检索数据......

4

1 回答 1

0

左加入这里

SELECT
  iodv.organization_id,
  iodv.organization_name,
  mil.SUBINVENTORY_CODE subinventory_name,
  mil.inventory_location_id locator_id,
  mil.segment11 || '.' || mil.segment12 || '.' || mil.segment13 locator_name
FROM
  inv_item_locations mil
LEFT JOIN 
    inv_organization_definitions_v iodv
ON 
    iodv.organization_id = mil.organization_id
WHERE 1 = 1
  AND iodv.Organization_Code = ':Organizations'
  AND mil.SUBINVENTORY_CODE = ':p_Subinventories'
于 2020-02-14T07:22:43.643 回答