使用库存控制的未知索引错误:"The index position 275 is not in use. The last index used is 7"

Unkown Index error by using Invantive Control: "The index position 275 is not in use. The last index used is 7"

错误在列 'whs.description' 上。它不会在连接时给出任何错误 'ExactOnlineREST.Inventory.Warehouses Whs on Whs.ID=SHO.Warehouse'

select  Pro.code
,      ShopOrderNumber
,      SHO.status
,      SHO.Description
,      ItemVersionDescription
,      BOM.CalculatedCostprice
,      SHO.PlannedDate
,      Whs.description
from   ExactOnlineRest.manufacturing.ShopOrders SHO
join   ExactOnlineREST.Project.Projects Pro on SHO.PROJECT=Pro.ID 
join   ExactOnlineXML.XML.ManufacturedBillOfMaterials BOM on "{" + SHO.ItemVersion  + "}"= BOM.ID_attr 
join   ExactOnlineREST.Inventory.Warehouses Whs on Whs.ID=SHO.Warehouse
Group 
by     Pro.code
,      ShopOrderNumber
,      SHO.status
,      BOM.CalculatedCostprice
order 
By     Pro.code
,      ShopOrderNumber
,      SHO.status
,      BOM.CalculatedCostprice

尝试以下查询:

select Pro.code
,      sho.ShopOrderNumber
,      SHO.status
,      SHO.Description
,      sho.ItemVersionDescription
,      BOM.CalculatedCostprice
,      SHO.PlannedDate
,      Whs.description
from   ExactOnlineRest..ShopOrders SHO
join   ExactOnlineREST..Projects Pro 
on     Pro.ID  = SHO.PROJECT
join   ExactOnlineXML..ManufacturedBillOfMaterials BOM 
on     BOM.ID_attr  = '{' || SHO.ItemVersion || '}'
join   ExactOnlineREST..Warehouses Whs 
on     Whs.ID = SHO.Warehouse
Group 
by     Pro.code
,      sho.ShopOrderNumber
,      SHO.status
,      BOM.CalculatedCostprice
order 
By     Pro.code
,      sho.ShopOrderNumber
,      SHO.status
,      BOM.CalculatedCostprice

此查询的结构不同,例如参见“与',并使用 || 而不是 +。

在我的 Exact Online 环境中,这个有效。