简体   繁体   English

多部分标识符无法绑定4

[英]The multi-part identifier could not be bound 4

I am trying to join a series of tables but have encountered an error. 我正在尝试加入一系列表,但遇到错误。 I have tried applying other Stack Overflow answers to my problem, but to no avail. 我曾尝试将其他堆栈溢出答案应用于我的问题,但无济于事。 I'm very new to SQL. 我对SQL非常陌生。

select gbkmut.artcode, gbkmut.warehouse, gbkmut.facode, Items.costpricestandard,  ic.DateStart, SUM(aantal)as stockQty  

FROM gbkmut
INNER JOIN Items AS ic ON ItemNumbers.ItemCode=ic.ItemCode
INNER JOIN Items ON Items.GLAccountDistribution = gbkmut.reknr 

Below is my error 以下是我的错误

The multi-part identifier "ItemNumbers.ItemCode" could not be bound. 无法绑定多部分标识符“ ItemNumbers.ItemCode”。

If it's not clear, gbkmut , ItemNumbers , and Items are the tables. 如果不清楚,则表为gbkmutItemNumbersItems

You have specified ItemNumbers.ItemCode in ON clause but you have not used ItemNumbers table in any Inner join.To use ItemNumbers.ItemCode you need to inner join with ItemNumbers Table. 您已在ON子句中指定了ItemNumbers.ItemCodeItemNumbers在任何内部联接中使用ItemNumbers表。要使用ItemNumbers.ItemCode您需要与ItemNumbers Table进行内部ItemNumbers

FROM gbkmut
INNER join ItemNumbers ON condition
INNER JOIN Items AS ic ON ItemNumbers.ItemCode=ic.ItemCode
INNER JOIN Items ON Items.GLAccountDistribution = gbkmut.reknr 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM