update mtl_secondary_inventories set attribute1=1
where Organization_Id IN (SELECT ood.ORGANIZATION_ID FROM org_organization_definitions ood WHERE ood.OPERATING_UNIT = 90)
and organization_id =93
and secondary_inventory_name in (
--子库存
select msi.secondary_inventory_name from mtl_secondary_inventories msi
where msi.Organization_Id IN (SELECT ood.ORGANIZATION_ID FROM org_organization_definitions ood WHERE ood.OPERATING_UNIT = 81)
and msi.attribute1='1'
and msi.Organization_Id=85
)
--查询子库存
select msi.secondary_inventory_name ,msi.organization_id,msi.description ,msi.attribute1 from mtl_secondary_inventories msi
where msi.Organization_Id IN (SELECT ood.ORGANIZATION_ID FROM org_organization_definitions ood WHERE ood.OPERATING_UNIT = 90)
and msi.attribute1='1'