Solved

Help with Update - tables on 2 servers

Posted on 2014-04-09
1
183 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 69

Accepted Solution

by:
Éric Moreau earned 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL - sum months, quarter, YTD 9 91
How to set audit trial on sql server 4 44
SQL HELP 2 82
SQl Agent job fails--SSIS package looses password 6 45
INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

911 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

16 Experts available now in Live!

Get 1:1 Help Now