Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
qman
Constraint Violating Yak Guru
442 Posts |
Posted - 2007-10-23 : 13:12:04
|
| I have a server named pivotaldb and another server named crmtest.From the pivotaldb server, I want to write a select statement which references a database on the crmtest. Can this be done? |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2007-10-23 : 16:06:12
|
| Check out Linked Servers in Book Online. |
 |
|
|
dataguru1971
Master Smack Fu Yak Hacker
1464 Posts |
Posted - 2007-10-23 : 17:45:53
|
| Once you link the server it is pretty easy..Select Table1.ColumnName, Table2.COlumnNameFrom pivotaldb.[Database].dbo.[Table1] Table1 inner join crmtest.[Database].dbo.[Table2] Table2 on Table1.LinkColumn = Table2.LinkColumn For example... |
 |
|
|
|
|
|