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 |
|
tdorflinger
Starting Member
3 Posts |
Posted - 2010-03-30 : 17:41:43
|
| Hello, I am new to SQL Server with very limited programming in the past. I am trying to create a report in MS Server BIDS that uses 2 data sets that come from two seperate SQL servers. I have got as far as getting both data sources connected and and creating the SQL Querys to pull the data from each data set without much problem. My question is how I can now compare one set against the other to narrow down my report. Example: I need to compare the PortID from one set against the Name in the other and only show data for matches. Any advice, or am I going about this all wrong. Thank you so much in advance. Trent |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2010-03-31 : 00:11:47
|
| I would populate 2 tables in the target server with the result sets from the remote servers and compare them there via T-SQL. |
 |
|
|
tdorflinger
Starting Member
3 Posts |
Posted - 2010-04-02 : 11:07:44
|
| Thank you for the linked server hint. It turns out that there is an existing link to the target server. However I am now trying to query both at the same time with no luck. When I query only the linked server it works fine, but no matter how I try to query both I get a multitude of errors. I have found several recommendations on other sites, but none have worked out. Any more ideas? Thank you. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-04-02 : 11:15:59
|
quote: Originally posted by tdorflinger Thank you for the linked server hint. It turns out that there is an existing link to the target server. However I am now trying to query both at the same time with no luck. When I query only the linked server it works fine, but no matter how I try to query both I get a multitude of errors. I have found several recommendations on other sites, but none have worked out. Any more ideas? Thank you.
once you have linked server set up correct query will be as simple asSELECT columns...FROM Yourloacltable tJOIN otherlinkedserver.database.schema.otherservertable t1on t1.fields=t.realtedfields.... not sure what error you're facing. if you post it, somebody might be able to help you in sorting it out------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|