Database Guide
To specify the example SQL UPDATE statement
UPDATE EMPLOYEE
SET CITY = :NEWCITY, JOBCODE = JOBCODE + 10
WHERE (STATE = 'NC') AND (STATUS = 'MOVE')
do the following:
- In the Query name field, type a name for the UPDATE
statement.
- In the Description field, type a description for the UPDATE
statement.
- In the Table/view field, select EMPLOYEE from the
drop-down list.
- In the Columns list, select CITY and
JOBCODE.
- In the SET columns list, select CITY.
- In the Column value field, type NEWCITY.
- From the Column value pull-down menu, select Host variable
:x.
- In the SET columns list, select JOBCODE.
- From the Column value pull-down menu, select Specify
expression.
- On the Expression Details window, do the following:
- In the Left operand field, select JOBCODE from the
list.
- In the Operator field, select + from the
list.
- In the Right operand field, type 10.
- Select Apply.
- Select WHERE clause.
- On the WHERE Details window, do the following:
- In the Left operand field, select STATE from the
list.
- In the Operator field, select = from the
list.
- In the Right operand field, type NC.
- From the Unary operator pull-down menu, select Right
operand > String constant
'x'.
- Select Add to operand lists.
- In the Left operand field, select STATUS from the
list.
- In the Operator field, select = from the
list.
- In the Right operand field, type MOVE.
- From the Unary operator pull-down menu, select Right
operand > String constant
'x'.
- Select Add to operand lists.
- In the Left operand field., select (STATE =
'NC') from the list.
- In the Operator field, select AND from the
list.
- In the Right operand field, select (STATUS =
'MOVE') from the list.
- Select Apply.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]