Join problem

Results 1 to 2 of 2

Thread: Join problem

  1. #1
    Join Date
    Dec 1969

    Default Join problem

    Hi All,<BR><BR>I have a query below: <BR><BR>SELECT Field1, field2, field3<BR>FROM (Venues INNER JOIN Dates ON Venues.venue = Dates.Venue) INNER JOIN Comedian ON Dates.Comedian =<BR>WHERE (((Venues.region)=&#039;North London&#039;));<BR><BR>Currently, the results only come from one table (Venues). But Later I will need to join 2 other tables to it, so I thought I&#039;d join them all now. My problem is that, when I do the query with just the one table (venues), the query returns a result, but when I do the above, i get no results at all. Any advice would be good!<BR><BR>I have been trying to execute the query above, directly in Access 2000.<BR><BR>Thanks in advance!

  2. #2
    Join Date
    Dec 1969

    Default Inner vs. Outer join

    When you use an inner join, you only get results when there are mathing rows in both tables.<BR><BR>When you want all the rows from one table and the corresponding rows from another table, you have to use outer joins.<BR><BR>SELECT * FROM table1<BR>LEFT OUTER JOIN table2 on table1.someid = table2.someid<BR><BR>this returns all rows from table1, and the corresponding rows from table2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts