Skip to content
Advertisement

Left Join On And clause not supported

I’ve looked into various posts (this one, that one and this other one) and thought I got the answer.

After a LEFT JOIN I may add an ON [condition] AND [other condition] (I’ve also tried WHERE). But computer says no. Access keeps saying the join expression is not supported.

Consider the student_records table below:

I want to find the minimum SEMESTERINDEX for each student from my students table, that’s above 20001. (Records below may be erroneous and the 0 and 1 SEMESTERINDEX is used for transferred credits.)

I’m using access so there are VBA functions inside the SQL. There’s several more tables I’m joining too, I’m quoting the whole query.

So did I misplace the AND student_records.SEMESTERINDEX > 2001?

Advertisement

Answer

oh my save me from these parenthesis and crazy indenting.

Here is how you do it. All the parenthesis don’t matter in SQL

This is called a sub-query in sql it allows you to perform your grouping on a sub-set and then join that back to the rest of the data.

I think you went wrong thinking there was something about the join that needed a filter — in fact it is the data that you were joining to that needed to be filtered.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement