[英]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. 如果不清楚,则表为gbkmut
, ItemNumbers
和Items
。
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.ItemCode
, ItemNumbers
在任何内部联接中使用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.