skip to main content
OpenEdge Reporting: Query/Results Administration and Development
Administering Results : The Join Construction dialog box
 
The Join Construction dialog box
The Join Construction dialog box allows you to build an expression that relates a base table to a second table. The expression that you build with the Join Construction dialog box is called a WHERE clause in the Progress 4GL. Regardless of whether you are adding a relationship or editing a relationship, the Join Construction dialog box is the only tool that supports these tasks.
You can only access the Join Construction dialog box from the Table Relationships dialog box as described in the “Editing a table relationship” section. The Join Construction dialog box appears as shown in Figure 2–1.
.
 
Figure 2–1: Join Construction dialog box
The Join Construction dialog box contains the following user‑interface elements:
Join
Displays the current relationship. If you add a new relationship, the Join field displays the beginning of a WHERE clause that will eventually build a table relationship. If you edit an existing relationship, the Join field displays the relationship. If the existing relationship is an OF relationship, the Customize Join toggle box appears next to the Join field. You must activate Customize Join before you edit an OF relationship between two tables. Editing an OF relationship in the Join Construction dialog box changes the relationship to a WHERE relationship.
Second table
Displays the fields of the second table.
Base table
Displays the fields of the base table.
Operator buttons
Comparison operators that you can use to build an expression between a field in the second table and a field in the base table. The AND and OR buttons represent logical operators that allow you to build compound expressions.
Join criteria
Specifies the syntax that forms the WHERE relationship between the base and second tables. The WHERE clause shows how a customer table can be related to an order table:
 
WHERE sports.customer.Cust-num = sports.order.Cust-num
For more information about the WHERE clause, see the FOR statement reference entry in the OpenEdge® Development: ABL Reference.
Building a table relationship
Use the Join Construction dialog box to define a relationship between two tables in Results.
To define a relationship between two tables in Results:
1. Select the Customize Join toggle box if it is displayed in the Join Construction dialog box.
2. Double‑click a field from the second table. As you build the expression, the syntax of the expression appears in the Join Criteria area.
3. Choose a comparison operator button.
4. Double‑click a field from the base table.
5. If you want to build a more complex relationship, choose either the AND or OR operator button and return to Step 1.
6. To save the current WHERE relationship and return to the Table Relationships dialog box, choose OK in the Join Construction dialog box.
Deleting a table relationship
Use the Table Relationships dialog box to delete an existing table relationship.
To delete an existing table relationship from Results:
1. Select a base table.
2. Select a table from the list of related tables.
3. Choose Remove.
4. Choose OK from the Table Relationships dialog box to write the table relationship modifications to the current QC7 file.
Database schema changes
Database schema changes, such as creating, modifying, or deleting a field, index, or table, can break existing Results queries. Field and table additions and deletions in an application database automatically register in the field and table listings in Results. However, schema modifications do not automatically register in the table relationships maintained in the current QC7 file, or in any existing queries based on those relationships.
To rebuild table relationships and regenerate existing queries based on those relationships:
1. Choose QuerySite AdminApplication Rebuild. The Application Rebuild dialog box appears:
The Application Rebuild dialog box lets you rebuild both the table relationships and existing queries, or just the table relationships.
2. To start the rebuild process, select one of the rebuild options, then choose OK.
If you choose to rebuild both the table relationships and existing queries, Results displays the Select Query Directory dialog box, which allows you to select the directory of queries you want to rebuild:
3. Select the queries you want to rebuild, then choose OK.
4. When there are no more query directories to rebuild, choose Cancel to end the rebuild operation.
During the rebuild operation, Results writes any problems encountered during the build process to the QL file associated with the current QC7 file. Use this information to identify problem queries that could not be rebuilt by Results. See the “Database configuration files” section for more information about QC7 and QL files.