Is it possible to do a 3-table join in MS-Access?

I am trying to make a 3-table join in Access and it doesn't work. Is it possible?

+2


a source to share


4 answers


MS-Access / Jet allows all types of multi-table joins available in different SQL style. For example, here's an example of a hierarchical example with three tables (a little more real than the other answers here):

SELECT
    x.FirstName,
    x.Surname,
    r.RegionName,
    c.CountryName
FROM
    (Customer x LEFT JOIN Region r
    ON r.ID=x.RegionID)
    LEFT JOIN Country c
    ON c.ID=r.CountryID

      



Or do you want to know how to do this using Visual Designer in MS-Access?

+8


a source


I once had a problem when I tried

select
  x,
  y
from 
  A        inner join
  B on k=l inner join
  C on f=g

      



It didn't work. But it works with brackets:

select
  x,
  y
from ( 
  A          inner join
  B on k=l ) inner join
  C on f=g

      

+5


a source


Yes, it is possible:

Select *
From A, B, C
Where A.a = B.b
And A.c = C.c

      

or

Select *
From A, B, C
Where A.a = B.b
And B.c = C.c

      

+1


a source


Access can do most types of joins (except full outer). I wonder with your join 3 tables if you are doing an ambiguous outer join? Take a look at this KB article for an explanation

support.microsoft.com/kb/124937

+1


a source







All Articles