Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Help with Update - tables on 2 servers

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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Agent Timeout 5 64
CROSS APPLY 4 56
Need help debbuging stored procedure 21 44
Are triggers slow? 7 10
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…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

809 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