Group selection made easy, Outer joins made powerful
Site owned & produced by MagnaFacta

Using Join Left Syntax with Else Logic

As the outer joins have a fixed code format in Else Logic we can state them just as well using special syntax that translates into an Else Logic statement.

The reason to use a JOIN LEFT and (JOIN RIGHT and JOIN BOTH|OUTER|FULL) syntax here has nothing to do with my preferences on the actual language to use, but was choosen because it was easier to implement.

The query example

We use a new variant of the previous examples.

show the companies and linked people if applicable

You can change this query from a left join into a right join by replacing JOIN LEFT with JOIN RIGHT. Notice that the order of the tables in the FROM is not relevant for the direction of the join. What is relevant is on what tables the outer product has been applied, but the outer product can be over applied with harm to the result.

The syntax for the outer join is JOIN BOTH just to do things different at any cost. Which is why JOIN OUTER and JOIN FULL can be used as well.

Conditions of use, Copyrights © & Intellectual Property Rights