我正在尝试在 Microsoft Query 中编写一个查询,它似乎是因为别名存在一些问题,但我不知道如何解决它,任何帮助将不胜感激!
SELECT item."No_",
item.Description,
ItemLedgerEntry."Location Code",
Sum(ItemLedgerEntry."Remaining Quantity") As Stock,
Sum(bo."Outstanding Quantity") As BackOrder
FROM Nav50.dbo.item item, Nav50.dbo.ItemLedgerEntry ItemLedgerEntry
LEFT OUTER JOIN ( SELECT SalesLine.No_,
Customer.Name, SalesLine."Location Code",
SalesLine."Outstanding Quantity"
FROM Nav50.dbo.Customer Customer, Nav50.dbo.SalesLine SalesLine
WHERE SalesLine."Sell-to Customer No_" = Customer.No_) bo
ON ((item."No_" = bo.No_) AND (ItemLedgerEntry."Location Code" = bo."Location Code"))
WHERE item.No_ = ItemLedgerEntry."Item No_" AND ((ItemLedgerEntry."Location Code"='STHLM') AND (ItemLedgerEntry."Remaining Quantity"<>$0))
GROUP BY item."No_", item.Description, ItemLedgerEntry."Location Code"
我收到的信息是:
无法绑定多部分标识符“item.No_”。