Joins combine records from two or more tables. Joins are a way of combining fields from two tables by using values common to each. To create a Join grab a column from a table entity and drop it off on a column in another table entity.

As soon as the column is released a Join Line is created and the corresponding SQL statement for it appears in the SQL Pane. The columns which are joined also highlight with a green background color in each table entity.

If your Join Lines are orange, and you don't see SQL for the join you created, you have enabled [Query Options] > [Ignore Unused Tables in Diagram]. See the Query Options for more on what this option does.

Clicking the Join Line launches the [Join Properties] Dialog. The Join Line's Join Properties icon will indicate the type of Join. The top of the Join Properties dialog will always list the name of the table you first dropped into the Diagram Pane as Left, even if you rearrange the tables in the Diagram Pane. Click the dropdown in the center of the [Join Properties] Dialog to select the Join Type by selecting a [Join Operator]. The chosen Join Operator will appear inside the Join Icon so you can visually determine what kind of Join you've created. Dark shading in the Join Type icon indicates which table's columns have included rows. 

The Join Properties of an existing Join can also be edited by left-clicking the Join Line or Join Properties icon. This allows editing the [Join Operator] to alter its [Join Type] and selecting all rows from any of the tables that participate. It's also possible to write a Custom Expression for the Join by clicking [Edit] in the [Join Properties] Dialog. You can then type your Custom Expression, or click [Reset] to revert to the original Join Expression.


When the [Include Rows] checkboxes are checked, the Join Properties icon changes to include shading associated with the table that is getting all of its columns included. If both [Include Rows] checkboxes are checked, dark shading will surround the Join Properties icon.
 
Below we have generated a Left Outer Join and the left side of the = symbol is shaded darker. The SQL Pane also indicates Left Outer Join.

 
Right-clicking on a Join Line also allows [Selecting All Rows from] each table, [Removing the Join], or editing the [Join Properties].

 
If all rows from each table are included, this generates a Full Outer Join. Notice the shading surrounding the = symbol in the middle.
 
Unchecking both checkboxes generates an Inner Join. Unchecking the top-most checkbox in [Include Row]s generates a Right Outer Join.
 

To remove a Join right click on the Join Properties icon and select [Remove Join]. This will only remove the Join Line (and its corresponding JOIN SQL from the SQL Pane) and will leave its associated table entities in the Diagram Pane.

To rapidly add a table into the Diagram Pane via a dialog, right-click within a blank area and choose [Quick Table Add...]. The resulting [Quick Table Add] Dialog appears and lets you QuickFilter and quickly add one or more tables or views from your connection into the Diagram Pane.



  • No labels