Solved

Update command giving error where two databases are involved

Posted on 2013-12-30
2
174 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 68

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Audit has been really one of the more interesting, most useful, yet difficult to maintain topics in the history of SQL Server. In earlier versions of SQL people had very few options for auditing in SQL Server. It typically meant using SQL Trace …
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video discusses moving either the default database or any database to a new volume.

705 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now