Solved

Multiple Access DBs in SQL Statement

Posted on 1998-07-29
3
168 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
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…

895 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now