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
Right-click anywhere in the Table pane and select
Add Table. The
Add Table dialog is displayed.
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.
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:
Add a condition to input an employee number to the query:
Click
Condition in the Details pane.
Click the first row under
Column and select
EMPLOYEENUMBER from the drop-down list.
Enter
= as the
Operator (or select it from the drop-down list).
Enter
? as the Value. This indicates that the value will be passed to the query from the database service task.