Creating Inner Joins In An Access Database

This seemingly undocumented SQL table qualification syntax mightbe 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 asa qualifier for the table. In this example I separated the fourtables found in the Biblio database into their own databases andissued this query in an empty database:

         SELECT Authors.*        FROM C:VB3Biblio1.Authors _                INNER JOIN _                (C:VB3Biblio2.MDB.Titles        INNER JOIN _                (C:VB3Biblio3.MDB.Publishers        INNER JOIN _                C:VB3Biblio4.MDB.[Publisher _                Comments]        ON Publishers.PubID = [Publisher _                Comments].PubID)         ON Titles.PubID = Publishers.PubID)         ON Authors.Au_ID = Titles.Au_ID;

While this may not work on ODBC, it works perfectly with Accessdatabases and overcomes the single external database ability withthe ‘IN’ clause.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin


Recent Articles: