我試過這段代碼:MERGE語句收益率綁定錯誤
Merge fact_table as target
using(select top 1 idDateDeb,PK_Date, Week_Of_Year from dbo.dim_date_Debut)
as source
on cast(source.PK_Date as date)=cast(dbo.FACT_TABLE.DATE_DEBUT_ALRM as date)
when matched then update set target.ID_TEMP_DEB=source.idDateDeb;
但我得到這個錯誤:
Msg 4104, Level 16, State 1, Line 4
The multi-part identifier "dbo.FACT_TABLE.DATE_DEBUT_ALRM" could not be bound.
我試圖做類似this question。
我建議不要鏈接到另一個問題,而是描述你在這裏要做的事情(尤其是如果它與另一個問題有*不同),否則這應該作爲一個副本關閉。 –