UPDATE statement
To specify the example SQL UPDATE statement
UPDATE EMPLOYEE
SET CITY = :NEWCITY, JOBCODE = JOBCODE + 10
WHERE (STATE = 'NC') AND (STATUS = 'MOVE')
do the following:
1. In the Query name field, type a name for the UPDATE statement.
2. In the Description field, type a description for the UPDATE statement.
3. In the Table/view field, select EMPLOYEE from the drop-down list.
4. In the Columns list, select CITY and JOBCODE.
5. In the SET columns list, select CITY.
6. In the Column value field, type NEWCITY.
7. From the Column value pull-down menu, select Host variable :x.
8. In the SET columns list, select JOBCODE.
9. From the Column value pull-down menu, select Specify expression.
10. On the Expression Details window, do the following:
a. In the Left operand field, select JOBCODE from the list.
b. In the Operator field, select + from the list.
c. In the Right operand field, type 10.
d. Select Apply.
11. Select WHERE clause.
12. On the WHERE Details window, do the following:
a. In the Left operand field, select STATE from the list.
b. In the Operator field, select = from the list.
c. In the Right operand field, type NC.
d. From the Unary operator pull-down menu, select Right operand > String constant 'x'.
e. Select Add to operand lists.
f. In the Left operand field, select STATUS from the list.
g. In the Operator field, select = from the list.
h. In the Right operand field, type MOVE.
i. From the Unary operator pull-down menu, select Right operand > String constant 'x'.
j. Select Add to operand lists.
k. In the Left operand field., select (STATE = 'NC') from the list.
l. In the Operator field, select AND from the list.
m. In the Right operand field, select (STATUS = 'MOVE') from the list.
n. Select Apply.
Last modified date: 01/29/2015