希望有人比我聰明能幫助我在這裏...收到錯誤「具有相同的鍵SSRS項目已被添加」在SQL Server 2014
我收到錯誤SSRS項目使用相同的密鑰具有已經添加了下面的SQL我已經嘗試罰款什麼是代碼的問題,但一直沒能找到它。
有人可以幫助我了:)
SELECT
Name.ID, Name.COMPANY, Name.CATEGORY,
HOUSEPOP.HH_INV AS 'Current Year HH_INV',
HOUSEPOP_1.HH_INV AS 'Last Year HH_INV',
name.MEMBER_TYPE, name.CATEGORY,
HOUSEPOP.TOTAL_POP,
(HOUSEPOP.HH_INV - HOUSEPOP_1.HH_INV) AS 'Difference',
((HOUSEPOP.HH_INV - HOUSEPOP_1.HH_INV)/HOUSEPOP_1.HH_INV) AS '% Change'
FROM
Name
INNER JOIN
HOUSEPOP ON Name.ID = HOUSEPOP.ID
INNER JOIN
HOUSEPOP AS HOUSEPOP_1 ON Name.ID = HOUSEPOP_1.ID
WHERE
HOUSEPOP.BILL_YEAR = @Bill_Year
AND HOUSEPOP_1.BILL_YEAR = @Bill_Year -1
ORDER BY
ID
可能重複[在SSRS中,爲什麼我得到錯誤「項目使用相同的鍵已被添加」,當我正在做一個新的報告?](https://stackoverflow.com/questions/14466874/在-SSRS-爲什麼-DO-I-GET-的誤差項與 - 相同的琴鍵具有-已經被添加-WH) – ViKiNG