Solved

Multiple Access DBs in SQL Statement

Posted on 1998-07-29
3
178 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
[X]
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
  • 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

724 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