Add Where

This option is used to place conditions on the query. You can have from zero to many where clauses for a query. Selecting this option opens the Where Properties dialog box.

Join Type

Join type indicates how the rows in the query will be joined together. Each of the values is described below.

Static Value

You will provide a static value used to select rows from the indicated table.

Field

The value from a Genesys Agent Scripting field will be used to select rows from the indicated table.

Join

The values from another table and column in the selected database will be used to select rows from the table.

Parent Join

This option is only valid in a nested query. This option allows the user to join rows in this table with a column value from a higher level query.

Table

This field contains a drop-down list of the tables in the selected database. You then select a Table from this list to be joined in this query.

Column

This field contains a drop-down list of columns within the selected table.

Operator

This field allows you to select the type of join. It contains a drop-down list of operators such as =, >, <, and Like.

If using the Like command to search for partial strings, the percent sign (%) indicates a wild card character when entered in a field.

Join to Table

This value is only valid if the join type is set to Join. In this case, you select another table from the drop-down list of tables in the database that is part of this query.

Join to Column

You select a column within the Join to Table or parent column in a nested join from the drop-down list.

Value

This field can contain either a static value or a Genesys Agent Scripting field.

Use as OR Condition

Database queries can have OR conditions. This is done by checking a box in the WHERE dialog box. Conditions will be grouped together based on the order in the tree.

For example, if you have the following conditions:

WHERE A = B

WHERE C = D <-- (Use as OR condition is checked)

WHERE E = F

The result will be:

WHERE (A = B OR C = D) AND E = F

When checked, the Use as OR condition applies to the WHERE condition that has been checked and the one immediately preceding it.

Optional

If this box is checked and the Join Type is set to Field, the Where clause will be dropped if the value of the field is an empty string. This allows for a query to be setup with multiple optional queries for searches. The actual query will be resolved at runtime.