Previous Topic Next topic Print topic


Manual Joins

Restriction: This topic applies to Windows environments only.

When you put more than one table into the Schema View of a prompted query, you should define a join condition. SQLWizard provides several methods for doing this, including Auto Join capabilities.

The following are steps to define a join on your own:

To define a join manually:

  1. Click the New Query button, or click the New command from the File menu followed by the Query command from the submenu.

    SQLWizard displays the Add Table dialog box.

  2. Click the EMPLOYEE and DEPT tables and click the Add button to add them to the query.
  3. Click the Done button to close the Add Table dialog box. When the Query Design window is displayed, you will see both tables side by side in the Table Display Area.
  4. Select some columns from each table by clicking on them. You now have a join, but it is the type of join known as a Cartesian product, which is a combination of all the rows in one table with all of the rows in the other table.

    To prevent the occurrence of a Cartesian product, you need to define a join condition, which relates a column in one table to a column in another table. The EMPLOYEE and DEPT tables are joined on the DEPT field. Scroll through the EMPLOYEE table's Column Selection List until you see the DEPT field. Click it, and drag to the DEPT field in the DEPT table. A line representing the join will appear.

Previous Topic Next topic Print topic