When managing a SQL statement or perhaps a saved procedure on the database, are you able to connect with an exterior database and pull data after that?
something similar to:
SELECT a.UserID, b.DataIWantToGet FROM mydb.Users as a, externaldb.Data as b
You will need to setup a Linked Server instance. You'll be able to reference the exterior database as if it were a SQL Server database.
Yep -- there are 2 techniques: either make use of the function
OPENROWSET, or use linked servers. OPENROWSET is helpful for ad-hoc single claims, but when you are likely to be carrying this out regularly, educate yourself on linked servers because they permit you to just do what you've specified by your SQL Statement ... e.g.,
SELECT database.owner.tablefor local data
SELECT server.database.owner.tablefor remote data
Company, you are able to combine to complete joins twixt local and remote. Note though that you need to be caureul should you choose joins against large tables which exist around the remote server because the query might take a very long time to exexute...