Building a Query - A Simple Example

The following example briefly demonstrates how to build a simple query against a database that contains employee information. The query selects an employee’s first and last names and their job title, based on their employee number (which will be passed into the query from the service task).

Procedure

  1. Right-click anywhere in the Table pane and select Add Table. The Add Table dialog is displayed.
  2. Browse and select a table - in this case, EMPLOYEES, then click OK. The table is displayed in the Table pane, showing the columns contained in the table.
  3. Click the fields that you want the query to return in the order that you want them returned - in this case, FIRSTNAME, LASTNAME and JOBTITLE.

    Note that the Outline pane now displays:

  4. Add a condition to input an employee number to the query:
    1. Click Condition in the Details pane.
    2. Click the first row under Column and select EMPLOYEENUMBER from the drop-down list.
    3. Enter = as the Operator (or select it from the drop-down list).
    4. Enter ? as the Value. This indicates that the value will be passed to the query from the database service task.
  5. Enter CTRL + S to save the query.