- Right-click a table in the Workspaces view and select
.
The table opens in the editor
window.
- Click the Prompted tab.
The Prompted menu opens with only the Sort
conditions and Row conditions panes
available.
- Click the Add Sort Condition button in the Sort
conditions toolbar.
The Sort Conditions window
opens.
- Specify the columns that will be used to sort the query results in one of the following
ways:
- Select one or more columns from the Columns in the result set list. The
Columns in the result set lists the columns that are included in the table.
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.
- Specify a conditional expression in the Or, enter a condition here field.
Click the ellipsis (...) to open an expression builder that will help you build the conditional
expression. 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 into the expression
fields.
- Specify the sort direction. Select Ascending to specify that the
query results will be sorted in ascending (lowest-to-highest) order. Select
Descending to specify that the query results will be sorted in descending
(highest-to-lowest) order. The first column is used for the primary sort; subsequent columns will
sort within the first.
- Click Add to add the sort condition to the table. If you are
changing a sort condition, click Change. Repeat this process for each column
that you want included in the sort conditions. When you have finished selecting the columns that
will be included in the sort conditions, click Close. The Sort Conditions
window closes.