Solved

Help with Update - tables on 2 servers

Posted on 2014-04-09
1
180 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
Comment Utility
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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

772 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

10 Experts available now in Live!

Get 1:1 Help Now