Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Visual Basic
Expertise: Beginner
Aug 8, 1997



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Creating Inner Joins In An Access Database

This seemingly undocumented SQL table qualification syntax might be useful to access an external table by using the 'IN' keyword. I had used this ability before, but kept having trouble with joins (probably due to my syntax) until I used the database path as a qualifier for the table. In this example I separated the four tables found in the Biblio database into their own databases and issued this query in an empty database:

        SELECT Authors.*
        FROM C:\VB3\Biblio1.Authors _
                INNER JOIN _
        INNER JOIN _
        INNER JOIN _
                C:\VB3\Biblio4.MDB.[Publisher _
        ON Publishers.PubID = [Publisher _
        ON Titles.PubID = Publishers.PubID) 
        ON Authors.Au_ID = Titles.Au_ID;

While this may not work on ODBC, it works perfectly with Access databases and overcomes the single external database ability with the 'IN' clause.

Mark P.
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date