[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

I want to join 2 tables from 2 different servers

Posted on 2007-04-03
3
Medium Priority
?
234 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
[X]
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
3 Comments
 
LVL 21

Assisted Solution

by:Kevin3NF
Kevin3NF earned 300 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 900 total points
ID: 18844013
yes linked server
and 4 part naming

Servername.Datebasename.ownername.tablevieworfunctionName
0
 
LVL 2

Assisted Solution

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

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

656 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