Specifying sorting criteria

In the grid at the bottom of the Quick Select dialog box, you can specify if you want the retrieved rows to be sorted. As you specify sorting criteria, PocketBuilder builds an ORDER BY clause for the SELECT statement.

Figure 17-9: Selecting columns for sort criteria

Shown is the scrollable grid area at the bottom of the Quick Select page of the Data Window wizards. At left are four labels for the rows of the grid. They are column, sort, criteria, or. In the column row, three column names display. A cell in the Sort row has been clicked beneath the Dept I D column name, causing a drop down list to display. The drop down list lets you specify whether the data should be sorted in Ascending or Descending order, or remain unsorted.

StepsTo sort retrieved rows on a column:

  1. Click in the Sort row for the column you want to sort on.

    PocketBuilder displays a drop-down list.

  2. Select the sorting order for the rows: Ascending or Descending.

Multilevel sorts

You can specify as many columns for sorting as you want. PocketBuilder processes the sorting criteria left to right in the grid: the first column with Ascending or Descending specified becomes the highest level sorting column, the next column with Ascending or Descending specified becomes the next level sorting column, and so on.

If you want to do a multilevel sort that does not match the column order in the grid, drag the columns to the correct order and then specify the columns for sorting.