dcsimg
Login | Register   
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


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

WEBINAR:

On-Demand

Application Security Testing: An Integral Part of DevOps


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 _
                (C:\VB3\Biblio2.MDB.Titles
        INNER JOIN _
                (C:\VB3\Biblio3.MDB.Publishers
        INNER JOIN _
                C:\VB3\Biblio4.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 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.

 

 

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