开发者

Update statement involving two different catalogs

Trying to execute an update of a single field where the current db wants to pull values from last night's backup. Should be something close to:

update myTable 
   set status = (select status 
               开发者_开发百科    from .lastBackup.dbo.myTable as t 
                  where t.idField = idField)

Help?


Try this:

update t
    set status = b.status
    from myTable t
        inner join lastBackup.dbo.myTable b
            on t.idField = b.idField
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜