Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying results from different SQL servers on one page

Status
Not open for further replies.

mliera

ISP
Joined
Apr 24, 2002
Messages
3
Location
US
I'm in need of guidance, I'm trying to query data and do a join to display that data as one, but from two different SQL servers.

One part of the info is all subscriber information, the other server contains the e-mail userid and pw credentials.

With out going into to much detail we use ldap for e-mail correspondence. Hence the SQL backend for credential validation.

subscriber SQLserver
use rrdb
go
declare @sub subnumber
select @sub = '%########%'
select * from subsinfo where subnumber like rtrim(ltrim(@sub))
select * from subservices where subnumber like rtrim(ltrim(@sub))
select * from subtier where subnumber like rtrim(ltrim(@sub))


The e-mail info info that I'm trying to join is

e-mail SQL server

select * from object_attributes where vc_val=###

I'm sure this is very simple for someone that is well versed in SQL.


All assistance is appreciated.

Thanks,
Marty
 
Link one server in the other. Create a view to Join the queries from the local and the remote (linked) server. See the following topics in SQL Books Online.

Distributed Queries and Distributed Transactions
Adding Linked Servers
Configuring Linked Servers
sp_addlinked_server

OpenQuery
OpenRowSet Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top