Feedback

  • Contents
 

Specify the Sort Order for Query Results

Use the Order pane in a query tool window to specify the sort order for the data returned in the query results. For example, if desk and customer display in the Order pane, the system sorts the query results by desk and then by customer within the desk.

To specify the sort order for query results

  1. Create a Query or Open an Existing Query.

  2. In the Data Selection pane, click the plus sign (+) next to a folder to expand it.

  3. Drag and drop a data item to use to sort the query results into the Order pane.

  4. Drag and drop more data as necessary.

Note: If the query tool window has a Select Columns pane, you can sort by aggregate data by dragging the aggregated column from the Select Columns pane and dropping it into the Order pane. For more information about aggregating data, see Assign an Aggregate Function to a Column.

  1. To delete a data item from the sort, in the Order pane, click the data item and then click the Delete icon. A confirmation dialog box appears. Click Yes.

  2. To change the sort order for data items, in the Order pane, click the data item and then click the up or down arrows to move the item in the list.

  3. To set the data item to sort in ascending order, in the Order pane, click the data item and then click the Ascending icon.

  4. To set the data item to sort in descending order, in the Order pane, click the data item and then click the Descending icon.