ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Querying 2 databases with one query string (https://www.excelbanter.com/excel-discussion-misc-queries/52214-querying-2-databases-one-query-string.html)

Ben Latham

Querying 2 databases with one query string
 
I can use the following code to create a conection string:

sConnect = "Provider=SQLOLEDB;" & _
"Data Source=Ben;" & _
"Initial Catalog=Northwind;" & _
"Integrated Security=SSPI"

...then execute a SQL statement to return the query results to my workbook.

Is it possible though, to store the results of a query that joins 2 tables
contaned in separate SQL databases?

Thanks

Ben


All times are GMT +1. The time now is 09:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com