我正在尝试使用SSIS中的SQL任务更新表,但是我收到错误:无法绑定多部分标识符“a.SourceSystemKey”。
Update BMR_STAGE.dbo.STG_AL_VSAccountStatuses
set a.SourceSystemKey = b.SourceSystemKey
,a.SourceSystem = b.SourceSystem
,a.NLCompany = b.NLCompany
,a.AccountStatus = b.AccountStatus
,a.Description = b.Description
,a.InsertAuditKey = b.InsertAuditKey
,a.UpdateAuditKey = b.UpdateAuditKey
,a.ChangeDate = b.ChangeDate
from BMR_STAGE.dbo.STG_AL_VSAccountStatuses a, BMR_STAGE.dbo.TMP_STG_AL_VSAccountStatuses b
where a.ID =b.ID
答案 0 :(得分:0)
该错误表示没有名为a.SourceSystemKey的字段或者该范围内无法识别别名a。尝试使用显式连接语法。
Update a
set
a.SourceSystemKey = b.SourceSystemKey
,a.SourceSystem = b.SourceSystem
,a.NLCompany = b.NLCompany
,a.AccountStatus = b.AccountStatus
,a.Description = b.Description
,a.InsertAuditKey = b.InsertAuditKey
,a.UpdateAuditKey = b.UpdateAuditKey
,a.ChangeDate = b.ChangeDate
from BMR_STAGE.dbo.STG_AL_VSAccountStatuses a inner join
BMR_STAGE.dbo.TMP_STG_AL_VSAccountStatuses b on a.ID = b.ID