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:
- From the Fields field, select the field name, and click Insert Field Name. The field name that you selected appears in the SQL field.
- From the Symbols field, select the symbol that you need, and click Insert Symbol. The symbol that you selected appears in the SQL field.
- Enter a field value after the symbol.
- A query appears in the SQL field. You can choose to Clear or Restore the query if necessary.
- If you want to include a segment field in the SQL query or use a BETWEEN operator:
- 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.
- Enter your values.
Follow these steps to construct a query restriction:
- From the Fields field, select the field name, and click Insert Field Name. The field name that you selected appears in the SQL field.
- From the Symbols field, select the symbol that you need, and click Insert Symbol. The symbol that you selected appears in the SQL field.
- Enter a field value after the symbol.
- 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.