(Contents)(Previous)(Next)

Defining Selection Criteria for the Columns

You can use the cells as of the Criteria line to formulate selection criteria for a column. This restricts the view to certain rows of the base tables. A selection criterion can have any length. You can select the Edit / Zoom function or click on the toolbar button to activate a larger editing area for easier entry.

Note the following when formulating a selection criterion: if the selection criterion comprises a single value, you can enter the value directly. If a predicate is used in formulating the selection criterion, the comparison values for the column must be set in accordance with its data type (i.e., the comparison value for non-numerical columns must be enclosed in single quotation marks).

You can use AND and OR operations to link several selection criteria. AND operations must always be formulated on one criterion line; OR operations must always be formulated on several criterion lines.

The AND Operation

The criteria for all columns formulated on one line are interpreted as AND operations. A column can be used for an AND operation without being visible. To simplify the formulation of AND operations, you can use the same column a number of times in the view description.

The OR Operation

Criteria located on different lines are interpreted as OR operations. A column can be used for an OR operation without being visible. To simplify the formulation of OR operations, you can use the same column a number of times in the view description.

Using Predicates

You can use all the predicates described in the ADABAS Reference manual to formulate a selection criterion. These predicates are formulated as described in Section Defining Selection Criteria for the Columns. Subqueries can also be defined as a component of a predicate (see the ADABAS Reference manual). In this case, as well, you can use the Edit / Zoom function or the toolbar button.

JOIN Predicate

The JOIN predicate is a special type of predicate that serves to link tables. To link two tables using a JOIN predicate, click on the column of the first table; holding down the mouse button, move the mouse pointer to the column of the second table and release the button. The link is displayed as a join line.

To specify a join operation more precisely, either select the Options / Joins function or double-click on the join line to display a list of all join definitions for this view. You can now define the join type and comparison operator for each join condition. To delete a join definition, click on the join line and select the Edit / Delete function.

Options When Defining Views

Under the Options / Object Options menu item, you can set the Check Option for the defined view (see the ADABAS Reference manual).

View Definition as SQL Statement

If the qualifying condition is so complicated that it is difficult to define it using the means described here, it is possible to complete the definition on the SQL level. Select the Options / SQL Statement function to access an editing window with the SQL statement for the view definition appears. To complete the SQL statement, you can add the WHERE qualification to it. Then execute the SQL statement for defining the view. Before executing it, replace the token <NONAME> with the name of the view to be defined.

However, DOMAIN does not display the qualification thus defined.


(Contents)(Previous)(Next)