Previous Topic Next topic Print topic


Creating an UPDATE Statement

Restriction: This topic applies to Windows environments only.

The easiest way to update individual records is to run a query, and switch to ALLOW EDIT mode. However, if you want to perform a batch update, you can use the WHERE condition generated for a query as the WHERE condition for an UPDATE statement.

To convert a SELECT command to an UPDATE statement:

  1. Create a query that retrieves the columns and rows that you want to update. You may want to test the query to make certain it retrieves the correct rows. You should also save the query before proceeding if you want to access it again in the Query Design window.
  2. Switch to SQL view.
  3. Replace the keyword SELECT with the keyword UPDATE.
  4. Enter the name of the table you are updating, and follow it with the keyword SET.
  5. After each of the column names, enter an = and an expression. If you decide you do not want to update the column, delete it from the list.
  6. Run or save the SQL statement from the SQL Edit window.
    Note: You cannot update a join or a query that contains DISTINCT, ORDER BY, GROUP BY, UNION, or Computed Columns.
Previous Topic Next topic Print topic