Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8399381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:17:24+00:00 2026-06-09T21:17:24+00:00

I have some SQL joining multiple tables in Access. When attempting to run it,

  • 0

I have some SQL joining multiple tables in Access. When attempting to run it, I get an error in the “JOIN” (specifically “JOIN expression not supported”). I believe I have narrowed down the problem to one join but why it isn’t working doesn’t make any sense to me. The original full SQL FROM clause is thus:

FROM  (
     (
      Customers RIGHT JOIN 
            (
            Sales LEFT JOIN SaleType ON Sales.SalesForID = SaleType.SalesForID
            ) 
      ON Customers.CustomerID = Sales.CustomerID
     ) LEFT JOIN 
          (
           StudentContracts LEFT JOIN
               (
               StudentsClasses INNER JOIN Classes ON StudentsClasses.ClassID = Classes.ClassID
                )
            ON StudentContracts.CustomerID = StudentsClasses.CustomerID
           ) 
       ON Customers.CustomerID = StudentContracts.CustomerID   
 )

The part I believe the query fails is on this “LEFT” join:

(
  StudentContracts LEFT JOIN
          (
          StudentsClasses INNER JOIN Classes ON StudentsClasses.ClassID = Classes.ClassID
          )
   ON StudentContracts.CustomerID = StudentsClasses.CustomerID
)

I’ve tried switching the the “LEFT” to an “INNER” and it works. I’ve switched it to a “RIGHT” and it works. Why will it not work for a “LEFT” join but work for the others? What I need is a result showing the records in joined “Classes” table linked to the StudentContracts but also the StudentContracts without a record in the Classes table. As per the answer on this post: Difference between left join and right join in SQL Server I am fairly certain I want a left join and this should work.

What am I missing here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T21:17:26+00:00Added an answer on June 9, 2026 at 9:17 pm

    Guess I should answer my own Q since the two suggestions weren’t really answers but suggestions on trouble-shooting (which worked) and I’ve found my answer now.

    It was indeed a problem with a previously defined join. StudentsClasses is joined to Classes on a many to one basis in the DB relationships. This is how most connections throughout the database will see these two tables as being linked. It is only in this case where I wish for them to be joined slightly differently. When my SQL asked for an inner join, it seems to have confused the access program as to what I meant (inner or outer join). By changing that to the appropriate outer join, the program started running fine.

    While an inner join is really what I wanted, in this case it didn’t really matter since the side with the extra records will be reduced by the other joins and thus won’t produce any records without a match in the Class table anyway (at least as far as I can see).

    So, many thanks to Remou and Matt Donnan for pointing me in the right direction!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When we use Natural Join, we are joining the tables when both table have
I have some SQL I need to get working on SQL 2005/2008. The SQL
I have some SQL similar to the following, which joins four tables and then
I have some SQL skill but I have a problem: I currently get a
I have a program in access that is using some linked ODBC tables. I
I have a NewsStories tables which I'm left joining with some related tables. Each
I have some SQL thats getting run and it is taking to long to
I have some sql statements that calculates some numbers. It's possible (with bonus points/penalty
I have some java.sql.Time objects as follows: String s1 = 12:00:04; String s2 =
I have some legacy SQL (SP) declare @FactorCollectionId int; select @FactorCollectionId = collectionID from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.