BlueJacket
Registered User.
- Local time
- Yesterday, 21:53
- Joined
- Jan 11, 2017
- Messages
- 92
I'm trying to get a better grasp of SQL and JOINS. One of the things I'm doing to help the process is looking at queries I've created in SQL view, and I'm a bit confused at how Access is writing the JOINS.
I have 5 tables:
tblPropertyDetails
tblQuietTitle_PropertyDetails
tblQuietTitle
tblAttorneys
tblJudges
In Design View, the tables are organized like so:
So it seems like the SQL code should read with a lot of LEFT JOINS and some INNER JOINS, but instead Access has it written like so:
I'm having a hard time understanding why. It seems like it's doing RED, then BLUE, then GREEN, then BLACK in that order, but I don't understand the Green and Blue parts specifically and why they're written as they are.
If any of that was followable, help in understanding and breaking down what's going on would be most helpful
Thanks in advance.
I have 5 tables:
tblPropertyDetails
tblQuietTitle_PropertyDetails
tblQuietTitle
tblAttorneys
tblJudges
In Design View, the tables are organized like so:
Code:
tblPropertyDetails --->tblQuietTitle_PropertyDetails--->tblQuietTitle----tblJudges
|----tblAttorneys
[COLOR="Blue"]*both tblJudges and tblAttorneys have INNER JOINS on tblQuietTitle. All other joins are LEFT JOINS.[/COLOR]
So it seems like the SQL code should read with a lot of LEFT JOINS and some INNER JOINS, but instead Access has it written like so:
Code:
FROM tblPropertyDetails LEFT JOIN [COLOR="GREEN"](tblJudges RIGHT JOIN[/COLOR] [COLOR="Blue"](tblAttorneys RIGHT JOIN[/COLOR]
[COLOR="Red"](tblQuietTitle_PropertDetails LEFT JOIN tblQuietTitle ON tblQuietTitle_PropertDetails.CaseID =
tblQuietTitle.CaseID)[/COLOR] [COLOR="blue"]ON tblAttorneys.AttorneyID = tblQuietTitle.AttorneyID)[/COLOR] [COLOR="GREEN"]ON tblJudges.JudgeID =
tblQuietTitle.JudgeID)[/COLOR] ON tblPropertyDetails.PropertyID = tblQuietTitle_PropertDetails.PropertyID;
I'm having a hard time understanding why. It seems like it's doing RED, then BLUE, then GREEN, then BLACK in that order, but I don't understand the Green and Blue parts specifically and why they're written as they are.
If any of that was followable, help in understanding and breaking down what's going on would be most helpful
Thanks in advance.