2017-04-05 34 views
2

錯誤位於列'whs.description'。它不會給在參加任何錯誤 'ExactOnlineREST.Inventory.Warehouses WHS上Whs.ID = SHO.Warehouse'通過使用無效控制的Unkown索引錯誤:「索引位置275未被使用,最後使用的索引是7」

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 
+0

*的錯誤是在列‘whs.description’*這列似乎存在是你有錯誤信息還是問題? –

回答

1

嘗試以下查詢:

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 

此查詢的結構不同,例如參見「對應的是」,並使用替代+的||。

在這一個工作我的確切Online環境。