Adding a WHEN condition

Use the Add WHEN condition window to specify a WHEN argument describing the conditions for unloading or discarding records from a table. When the condition is true, the row qualifies for unloading or discarding. When the condition is false or unknown, the row does not qualify.



These steps are part of the larger task of reorganizing a table space. When you complete the steps for adding the condition statements, return to the main task.

To create a WHEN condition:

  1. In the Add WHEN condition notebook, type a table owner and table name, or click to select names from the list box.

  2. On the Locate page of the notebook, expand the the list of Column names and select the ones that you want to include in the WHEN condition. You can include the same column names more than once; for example, WHEN tsname = bob% or TSNAME=BSMITH.

  3. Select the Comparison that you want. For example, use LIKE to find values that match some of the characters that you specify; or use = to find an exact match.

  4. Type the value you want to use in the condition. You can also use wildcard characters, such as % or the underscore _.

  5. Select either the Meet all conditions or the Meet any conditions radio button to specify whether to meet all the conditions selected in the fields on the Locate page, or meet at least one of the conditions. Meet all conditions is equivalent to adding an and between the search criteria, and Meet any conditions is equivalent to adding an or between the search criteria.

  6. Select the Clear push button to erase all the current data to define a new condition.

  7. Optional: To view or edit the clause that you created, go to the Advanced page of the notebook.

  8. Click OK to save the changes and close the window.


[Return to Reorganize Table Space]