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 |
|
Hommer
Aged Yak Warrior
808 Posts |
Posted - 2004-12-09 : 10:25:12
|
| I have SQLInstance1 with dbFinance and SQLInstance1 with dbSales.I want to join Invoice from dbFinance to Order from dbSales on OrderID, but could not find the right way to do it.I remember several months ago, when I discussed the possible designs of the databases, some experts on this forum replied that this is possible, thus recommend putting them in different sql instance.I appreciate your help! |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2004-12-09 : 10:30:01
|
| select x,y,z from dbfinance.dbo.invoice ainner join server2.dbsales.dbo.order b on a.orderid = b.orderidhaving 1st defined server2 to server1 using sp_addlinkedserver |
 |
|
|
Hommer
Aged Yak Warrior
808 Posts |
Posted - 2004-12-09 : 12:43:26
|
| Thanks. Now I can select tables from a remote server.But I also run into an error saying Cannot resolve collation conflict for equal to operation.On the join column, I had Latin1_General_BIN on one side andSQL_Latin1_General_CP1_CI_AS the other.What function I can use to convert/cast them equal? |
 |
|
|
Hommer
Aged Yak Warrior
808 Posts |
Posted - 2004-12-09 : 12:56:18
|
| I found the solution: ON a.id = b.id collate SQL_Latin1_General_CP1_CI_AS |
 |
|
|
|
|
|