Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Multiple Access DBs in SQL Statement

Posted on 1998-07-29
3
175 Views
Last Modified: 2010-05-03
How do you specify multiple DBs in VB's Data-control-SQL(Recordsource property)?
Im using vb5.0

(I need to match entries from 2 different .mdb files using a sql statement in the data-control.)
0
Comment
Question by:Deep Diver
  • 2
3 Comments
 
LVL 6

Expert Comment

by:anthonyc
ID: 1467058
From table1's database, use this query.

select table1.*, table2.*
  from table1 inner join table2 in "c:\path\to\other\mdb.mdb"
    on table1.column1 = table2.column1
0
 

Author Comment

by:Deep Diver
ID: 1467059
This might work in some cases anthony, but the only column in table 1 corresponding to a column in table 2, in my case, does not always have matching entries. This is the whole problem. I want to find out (with SQL) wich entries does have matching entries and wich not.

sorry, but the answer is not that simple...
0
 
LVL 6

Accepted Solution

by:
anthonyc earned 100 total points
ID: 1467060
yes, the answer >IS< that simple.  Please try something before you bash it.

select table1.*, table2.*
  from table1 left join table2 in "c:\path\to\other\mdb.mdb"
    on table1.column1 = table2.column1
 where isnull(table2.column1)

will return all records that are in table1 and NOT in table 2.

0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question