• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 187
  • Last Modified:

Update command giving error where two databases are involved

update ind13.dbo.mstmassstudents
set ind13.dbo.mstmassstudents.ims=ind13i.dbo.mstmassstudents.ims  
from ind13.dbo.mstmassstudents
inner join ind13i.dbo.mstmassstudents on
ind13.dbo.mstmassstudents.uid = ind13i.dbo.mstmassstudents.uid
and ind13.dbo.mstmassstudents.subjectcode  = ind13i.dbo.mstmassstudents.subjectcode
and ind13.dbo.mstmassstudents.course  = ind13i.dbo.mstmassstudents.course
and ind13.dbo.mstmassstudents.semester  = ind13i.dbo.mstmassstudents.semester

I want to update ims field if ind13.dbo.mstmassstudents
from ind13i.dbo.mstmassstudents

Where is an error
1 Solution
QlemoC++ DeveloperCommented:
To reduce the probability of typos please use aliases:
update i13stud
set ims = i13istud.ims
from ind13.dbo.mstmassstudents i13stud
inner join ind13i.dbo.mstmassstudents i13istud on
i13stud.uid = i13istud.uid
and i13stud.subjectcode  = i13istud.subjectcode 
and i13stud.course  = i13istud.course
and i13stud.semester  = i13istud.semester 

Open in new window

If that still does not work, provide the error message, please.
searchsanjaysharmaAuthor Commented:

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now