Edit Update Data Scenario

Figure 0.2 Edit Update Data Scenario

This is the dialog used to select the desired tables to update data on.

The available database tables for this scenario are shown on the left, and the tables selected for update data generation are on the right.

Select the tables that you want to generate Update SQL statements for by dragging and dropping the tables from the 'Available Tables' tree. To enter a Where clause to restrict the data to be updated, select the table on the right hand tree and either type in the text or build it with the SQL Builder .

To include or exclude a column click on the check box shown to the left of the column, or select the appropriate action from the Include tab. Include or Exclude all columns by selecting the table, then pressing the Include All or Exclude All button.

Use the Override tabs to override the default generated data to be used in the Update SQL statement. For further details, see the Overriding Column Data Generation Rules section in the Insert Data Generation chapter.

Move the order of the tables by selecting a table with the mouse and dragging it vertically up or down. Move the order of the columns to be generated in the same manner.

You can set a default Where clause for a table by selecting a table from the left side 'Available Tables' tree and updating it. Then each time that table is selected for any update data scenario, it will initially use the default until it is overridden.

Generate a range of Update statements that only update specific rows with the <range> variable. Each time the <range> variable is used in the Where clause, it will be substituted for the actual value from the Start Range to the End Range. For example, if you set the Start Range to 1 and the End Range to 10 this will generate 10 Update SQL statements. It the Where clause contains the text "where id = <range>" the first statement will generate the Where clause "where id = 1", the second will have "where id = 2" and so on. This controls the rows of data that will be updated.

Helpful Hint: To first see which rows of data will be affected by the generated Update SQL statement, copy and paste your Where Clause on to the same table in the Select SQL generator, run it, and examine the results file to see which rows will be updated. Note: You cannot use the <range> variable in the Select Where Clause.

More:

Build Where Clause

Generate


Contents Previous Next