Where Clause

To receive only records that match the specified criterion, use the Where Clause section of the Filter-Layout dialog. A where clause helps you narrow down the search results of an object.

Example: Specify to return rows only when the employee name is JOHN from an employee table.

Follow these steps:

  1. Select the field below the Start Bracket heading and select ( from the drop-down list. The right parenthesis ( specifies the start of the where clause.

  2. Click <--SELECT COLUMN--> and select a column from the drop-down list.

  3. Click the = field and select an operator depending upon the data type of the column from the drop-down list. The operator depending on the data type of the column. The available operators are:

    • =
      Specifies equal.

    • <>
      Specifies not equal.

    • >
      Specifies greater than.

    • <
      Specifies less than.

    • <=
      Specifies greater than or equal to.

    • >=
      Specifies less than or equal to.

    • LIKE
      Specifies like predicate.

    • IN
      Specifies that a value must be in the form of value1, value2, and so on.

    • NOT IN
      Specifies that a value is in a group of values.

    • IS NULL
      Specifies that a value is null.

    • IS NOT NULL
      Specifies that a value is not null.

  4. Select the field below the Value heading and enter the field value that you are searching for.

  5. Select the field below the End Bracket heading and select ) from the drop-down list. The left parenthesis ) specifies the end of a where clause.

  6. (Optional) If you want to specify a where clause for another column, select the field below the Conjunction and select a conjunction, AND or OR.

    • AND
      Indicates that a row must meet all the conditions.

    • OR
      Indicates that a row must meet only one of the conditions.

      • Click the + field next to the conjunction column.
        A row is added for another Where Clause.

      • Repeat the steps 1 through 5 for a column.

After adding Where Clause for the required columns, specify the other filter criteria.