Specifying search conditions for rows

Use the Conditions page to exclude duplicate rows from the result set, and to specify a search condition that will return specific rows. You can specify multiple search conditions on this page. You can use the controls on the Conditions page to create conditions, or you can type conditions directly into the Conditions field.

../rule.gif

To exclude duplicate rows, select the Exclude duplicate rows (SELECT DISTINCT) checkbox. This action eliminates all but one of each set of duplicate rows in the result set.

To specify search conditions:

  1. Select the column for the search from the Available columns list.

  2. Select an operator from the Operators list.

  3. Type one or more values in the Values list. Enter one value per line. Click Clear to remove all of the values from the Values list.

    If you selected the Between operator in the Operators list, you must enter two values per line in the Values list. The values are separated by an ampersand (&).

    You can search for appropriate values by clicking Find.

    You can specify host variables in the Values list. To do this, click on a line in the Values list, then click Add Variable. The Add Variable window is displayed. Type the variable name, then click OK. The Add Variables window closes, and the variable is added to the Values list on the Conditions page.

    You can specify parameters in the Values list. If a parameter is specified, its value is used in the search condition. A parameter is specified in the format :parm, where parm is the parameter name. For example, :empid is a valid specification for a parameter named empid.

  4. Click Add to add the condition to the Conditions field.

  5. To specify additional search conditions for your statement, click And or Or. Then, build the second search condition as described in the previous steps. When you click Add, the subsequent conditions are appended to those that already are displayed in the Conditions field.

You can edit the text in the Conditions field directly. You can remove search conditions by highlighting the portion of the condition that you want to remove in the Conditions field, and pressing the Delete key on your keyboard.

To build complex conditions, click Advanced Expression. The Expression Builder - Conditions window is displayed. For help on using the Expression Builder, see Building expressions.

../rule.gif

Related information

Conditions page - Fields and controls

Specifying the tables for an SQL statement

Specifying result columns

Joining tables

Grouping rows and specifying search conditions for groups

Sorting the result set

Verifying the SQL statement

Inserting column values

Updating column values

Completing your SQL statement

Remapping data to another SQL data type

Creating SQL statements with SQL Assist

Logging on to SQL Assist

Selecting the type of SQL statement to create