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
精彩评论