DB2 graphic QMF Version 8

Sort Conditions

Sort condition control how to sort the rows that will be included in the query results. Rows can be sorted in ascending (A-Z) or descending (Z-A) order.

If you sort your rows by more than one column, the first column is ordered first, then the second column is ordered within the sort order defined for the first column.

There are several methods by which to specify a sort condition:

Select Query --> Add --> Sort Conditions or click the icon in Sort Conditions list box to open the Sort Conditions dialog box and specify the sort conditions.

Table 20. Sort Conditions Dialog
Field Description
Columns in result set Lists the columns that will be included in the query results.
  • You can select one or more columns if you are adding a sort condition
  • You can select only one column if you are changing a sort condition
Other available columns List columns that will not be included in the query results but are available in the table that was queried. You can select any of these columns for the sort.
Or, enter a sort condition Type a condition by which columns should sort.
Expression Builder

The Expression Builder offers a palette of common elements used to create SQL expressions, such as column names, constants, functions, and operators. When you click the Expression Builder buttons, templates for expression elements are inserted.

You can invoke the Expression Builder by:

  1. pressing Alt + .
  2. clicking the browse icon to the right of the Enter a sort condition field
Sort direction Apply an ascending (lowest-to-highest) or descending (highest-to-lowest) sort order to the columns selected.

The first column is used for the primary sort; subsequent columns will sort within the first.


Go to the previous page Go to the next page

Downloads | Library | Support | Support Policy | Terms of use | Feedback
Copyright IBM Corporation 1982,2004 Copyright IBM Corporation 1982, 2004
timestamp Last updated: March, 2004