Creating ORDER BY clauses in SELECT statements in the SQL builder

The ORDER BY clause specifies the order of the rows of a results table for an SQL statement.

If a single sort specification is identified, the rows are ordered by the values of that sort specification. If more than one sort specification is identified, the rows are ordered by the values of the first indicated sort specification, and then by the values of the second identified sort specification, and so on. You can set the ORDER BY clause for SELECT statements and FULLSELECT statements.

Prerequisite: The SELECT statement must be open in the SQL builder.

To create an ORDER BY clause in a SELECT statement in the SQL builder:

  1. In the Design pane of the SQL builder, click the Columns tab.
  2. Double-click the cell under the Sort Type heading in the row that contains the column or column expression to sort by.
  3. Select Ascending or Descending in the list.
  4. Double-click the cell under the Sort Order heading.
  5. Select the number that corresponds to the order in which to sort the results, and then press Enter.

Feedback