首页 新闻 会员 周边 捐助

无法绑定由多个部分组成的标识符

0
悬赏园豆:10 [已关闭问题] 关闭于 2012-10-18 11:58

SELECT S.CustomerID, SO.SalesOrderNumber, SO.OrderDate, SO.TotalDue, S.Name AS Store,
A.City, SP.Name AS StateProvince, CR.Name AS CountryRegion, SC.ContactID As StoreContactID,
T.[Group] As TerritoryGroup, Year(SO.OrderDate) as Year
FROM Sales.Store AS S
JOIN Sales.CustomerAddress AS CA ON CA.CustomerID =S.CustomerID
JOIN Person.Address AS A ON A.AddressID = CA.AddressID
JOIN Person.StateProvince SP ON P.StateProvinceID = A.StateProvinceID
JOIN Person.CountryRegion CR ON CR.CountryRegionCode = SP.CountryRegionCode
JOIN Sales.SalesOrderHeader AS SO ON S.CustomerID = SO.CustomerID
JOIN Sales.StoreContact SC ON S.CustomerID = SC.CustomerID
JOIN Sales.Customer C on S.CustomerID = C.CustomerID
JOIN Sales.SalesTerritory T on C.TerritoryID = T.TerritoryID
ORDER BY S.CustomerID

 

执行产生这样的错误提示:

消息 4104,级别 16,状态 1,第 1 行
无法绑定由多个部分组成的标识符 "P.StateProvinceID"。

l277978707的主页 l277978707 | 初学一级 | 园豆:160
提问于:2012-10-18 11:50
< >
分享
所有回答(1)
0

SP

l277978707 | 园豆:160 (初学一级) | 2012-10-18 11:58
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册