|
|
 |
RE: FN-FORUM: ODBC Query two DB's
date posted 3rd August 2005 15:13
You can do;
SELECT t1.field1, t2.field2 FROM DB1.DBO.TABLENAME t1, DB2.DBO.TABLENAME
t2 WHERE T1.id =3D t2.id
So long as the databases are on the same server.
You *can* do it with differnet servers (best via a stored procedure)
-----Original Message-----
From: [EMAIL REMOVED] [EMAIL REMOVED] On Behalf Of
[EMAIL REMOVED]
Sent: Wednesday, August 03, 2005 11:11 AM
To: Andy Macnaughton-Jones
Subject: FN-FORUM: ODBC Query two DB's
Hi All, I am producing a report based on information coming from 2 DB's
both of which reside on the same MS SQL server. Having made the ODBC
conncetion I am quite happy pulling in the respective tables from one DB
want I now want to do is pull in the Tables/fields from the DB but this
is where I loosing the plot.
I am thinking along the lines that I need a VB command or some kind of
dual ODBC connection. Am I making this more comlicated than it really
is?
I only have one common ID to match to and that is ProductId
Andrew
--
Freelancers, contractors earn more with Prosperity4 Call 0870 870 4414
or visit www.prosperity4.com and benefit from Inland Revenue approved
expenses today.
To advertise here: http://www.freelancers.net/advertising.html
|
 |
|