我试过这段代码: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。
我建议不要链接到另一个问题,而是描述你在这里要做的事情(尤其是如果它与另一个问题有*不同),否则这应该作为一个副本关闭。 –