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

32 views Asked by At

The error is on the column 'whs.description'. It won't give any error at the join '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
1

There are 1 answers

0
Guido Leenders On BEST ANSWER

Try the following query:

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

This query is structured differently, see for instance " versus ', and use of || instead of +.

On my Exact Online environment this one works.