Urg:It is possible to join two tables from two different databases ? 
Author Message
 Urg:It is possible to join two tables from two different databases ?

Hi there,

I need to join two tables from two different MDB files. How can I do
that ? The Analise table resides in one database and the PlanoDeContas
table resides in another database.

UPDATE Analise INNER JOIN PlanoDeContas ON Analise.CodigoServico =
PlanoDeContas.Codigo
SET Analise.NomeServico = [PlanoDeContas].[DescricaoServico];

Thanks a lot,
Wagner Maxsen



Fri, 30 Nov 2001 03:00:00 GMT  
 Urg:It is possible to join two tables from two different databases ?
Look at the UNION statement in SQL.


Quote:
> Hi there,

> I need to join two tables from two different MDB files. How can I do
> that ? The Analise table resides in one database and the PlanoDeContas
> table resides in another database.

> UPDATE Analise INNER JOIN PlanoDeContas ON Analise.CodigoServico =
> PlanoDeContas.Codigo
> SET Analise.NomeServico = [PlanoDeContas].[DescricaoServico];

> Thanks a lot,
> Wagner Maxsen



Fri, 30 Nov 2001 03:00:00 GMT  
 Urg:It is possible to join two tables from two different databases ?
Sorry...I didn't read your question carefully enough.  UNION is not the
correct answer.


Quote:
> Hi there,

> I need to join two tables from two different MDB files. How can I do
> that ? The Analise table resides in one database and the PlanoDeContas
> table resides in another database.

> UPDATE Analise INNER JOIN PlanoDeContas ON Analise.CodigoServico =
> PlanoDeContas.Codigo
> SET Analise.NomeServico = [PlanoDeContas].[DescricaoServico];

> Thanks a lot,
> Wagner Maxsen



Fri, 30 Nov 2001 03:00:00 GMT  
 Urg:It is possible to join two tables from two different databases ?
From within your main database (the one you work with) provide a link to the
table in the other database.  You can then query the data from the external
table.  Peice of cake

Goto File menu, Get External Data, Link Tables, choose the database you want
the table from and then choose the table or tables you want to query.  You
now can write a query to create the join and call it with ADO or just use
ado to create the join.  Let me know if you need anything else.

Ray


Quote:
>Hi there,

>I need to join two tables from two different MDB files. How can I do
>that ? The Analise table resides in one database and the PlanoDeContas
>table resides in another database.

>UPDATE Analise INNER JOIN PlanoDeContas ON Analise.CodigoServico =
>PlanoDeContas.Codigo
>SET Analise.NomeServico = [PlanoDeContas].[DescricaoServico];

>Thanks a lot,
>Wagner Maxsen



Fri, 30 Nov 2001 03:00:00 GMT  
 Urg:It is possible to join two tables from two different databases ?

Quote:

>I need to join two tables from two different MDB files. How can I do
>that ? The Analise table resides in one database and the PlanoDeContas
>table resides in another database.

You can "link" the tables in one database into the other database.
Then, as far as Jet is concerned, the external tables are located in
the local database, and you can do queries that join the tables.

You can either link the tables interactively using MS Access, or you
can do it programmatically by appending a tabledef to the tabledefs
collection, and specifying the location of the external database as
part of the .connect attribute.

-- Jim Ferguson, FMS
   remove "nospam" to reply
   http://www.fmsinc.com



Sat, 01 Dec 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Table join between two tables in different databases

2. Joining two tables from two databases

3. Joining two tables from different databases

4. Table join between two different databases (MSSQL 6.5)

5. Open Two Database with Two System.Mda and Two different User Names and Password

6. Trying to bind data from two different tables to two different controls

7. Here's a sticky wicket - joining two tables on two diffrent servers with ADO

8. Creating a join on tables in two different MSSQL 6.5 DB's

9. Joining two tables on different length fields

10. joining two tables from different dbs

11. Querying two recordset objects or Joining tables from different datastores

12. Joining two tables from different dbs

 

 
Powered by phpBB® Forum Software