Solved

I want to join 2 tables from 2 different servers

Posted on 2007-04-03
3
221 Views
Last Modified: 2010-07-27
I want to join 2 tables from 2 different servers.  I envisioned something like:

SELECT *
FROM Server1.Datebase.table t1 LEFT JOIN Server2.Database.table t2 ON t1.Index = t2.Index

Can this be done in t-sql?
0
Comment
Question by:jamesrbarnes
3 Comments
 
LVL 21

Assisted Solution

by:Kevin3NF
Kevin3NF earned 100 total points
ID: 18843923
You need to set up the "other" server as a linked server.  Check out sp_addlinkedserver in Books Online, or look in the GUI for the version you are using...which is what...2000 or 2005?
0
 
LVL 50

Accepted Solution

by:
Lowfatspread earned 300 total points
ID: 18844013
yes linked server
and 4 part naming

Servername.Datebasename.ownername.tablevieworfunctionName
0
 
LVL 2

Assisted Solution

by:poogy21
poogy21 earned 100 total points
ID: 18849202
yes. setup a "linked server" and you could do exactly that.
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Suggested Solutions

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.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

759 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

18 Experts available now in Live!

Get 1:1 Help Now