Please enable JavaScript to view this site.

ESL Documentation

This section describes how to use the DB/Assist dialog boxes to build a SQL UPDATE statement. An UPDATE statement changes the values in one or more rows in a single table.

After you build an UPDATE statement, DB/Assist displays question marks (?) as part of the statement syntax in the SQL Editor window. These question marks are parameter markers, which are placeholders that you replace with host variables when you link variables to the statement, as described in Linking Variables to SQL Statements.

In order to dynamically run an UPDATE statement, you must replace the parameter markers with specific values. To do so, you can supply values for the parameter markers in the Input Values dialog box when you run the statement, as described in Using the Input Values Dialog Box.

With DB/Assist, you can build two forms of UPDATE statements:

A searched UPDATE statement updates one or more rows of data.

A positioned (cursor-based) UPDATE statement uses the WHERE CURRENT OF clause to update a single row of data pointed to by the current cursor position. The cursor is one defined for a previously-created multi-row SELECT statement in your SAM.

The following sections describe how to build each form of UPDATE statement.

Building a Searched UPDATE Statement

Building a Positioned UPDATE Statement

Several of the procedures for building UPDATE statements are identical to those described in previous sections for building SELECT statements. Therefore, the procedures in this section refer you to the SELECT procedures as needed for more information.