Defining an SQL query or query restriction

The dialog provides the names of the database fields, the allowed operators, an example of a valid value, and validation of the string with error messages if an invalid string is generated.

You can:
  • Construct the query by inserting field names and symbols
  • Enter the query into the SQL window directly

Follow these steps to construct an SQL query:

  1. From the Fields field, select the field name, and click Insert Field Name. The field name that you selected appears in the SQL field.
  2. From the Symbols field, select the symbol that you need, and click Insert Symbol. The symbol that you selected appears in the SQL field.
  3. Enter a field value after the symbol.
  4. A query appears in the SQL field. You can choose to Clear or Restore the query if necessary.
  5. If you want to include a segment field in the SQL query or use a BETWEEN operator:
    1. Ensure that the Include Segment Field in SQL checkbox is checked. If you need to use the BETWEEN operator, ensure that the Use BETWEEN operator checkbox is checked.
    2. Enter your values.

Follow these steps to construct a query restriction:

  1. From the Fields field, select the field name, and click Insert Field Name. The field name that you selected appears in the SQL field.
  2. From the Symbols field, select the symbol that you need, and click Insert Symbol. The symbol that you selected appears in the SQL field.
  3. Enter a field value after the symbol.
  4. A query appears in the SQL field. You can choose to Clear or Restore the query if necessary.

An error message appears in the Error Description field if a query string is not validated.