Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Update command giving error where two databases are involved

Posted on 2013-12-30
2
Medium Priority
?
182 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 71

Accepted Solution

by:
Qlemo earned 2000 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

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

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

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 …
Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

886 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