Solved

Update command giving error where two databases are involved

Posted on 2013-12-30
2
177 Views
Last Modified: 2013-12-30
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
0
Comment
Question by:searchsanjaysharma
2 Comments
 
LVL 69

Accepted Solution

by:
Qlemo earned 500 total points
ID: 39746152
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.
0
 

Author Closing Comment

by:searchsanjaysharma
ID: 39746170
tx
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question