[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Help with Update - tables on 2 servers

Posted on 2014-04-09
1
Medium Priority
?
203 Views
Last Modified: 2014-04-09
Hi..
I'm trying to update a table on 1 server from another on another server.
How do I reference them / alias them  
The following does not work

UPDATE [server1].[db1].dbo.tRep A SET IS_ACTIVE = 1
FROM  [server2].[db2].dbo.REP B WHERE A.REPNO = B.REPNO

How do I alias the db/tables?

thx
0
Comment
Question by:JElster
1 Comment
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 2000 total points
ID: 39988446
UPDATE A
SET IS_ACTIVE = 1
FROM [server1].[db1].dbo.tRep A
inner join [server2].[db2].dbo.REP B
on A.REPNO = B.REPNO
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
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. …

872 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