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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I use data from a table on different Server 1

Status
Not open for further replies.

ssecca

Programmer
Feb 13, 2002
219
US
I need to refer to a table on a different server and database for a stored procedure from the original Server/Database. Can someone assist me with a way to acomplish this?

Thank You
 
You can set up the second server as a linked server, then fully qualify the table name in the query:

Code:
select * from Server.Database.Owner.Table

Or use OPENDATASOURCE to link to the server on the fly. Please check out BOL for OPENDATASOURCE; I'd rather not parrot.

--Angel [rainbow]
-----------------------------------
Every time I lose my mind, I wonder
if it's really worth finding.
 
Thank you Opendatasouce is what I was looking for in this case.
 
Glad to be of service. Thanks for the star. Happy coding!

--Angel [rainbow]
-----------------------------------
Every time I lose my mind, I wonder
if it's really worth finding.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top