Sorting an Answerset - SQL Assistant

Teradata SQL Assistant for Microsoft Windows User Guide

SQL Assistant
Release Number
English (United States)
Last Update
Product Category
Teradata Tools and Utilities

Sorting an Answerset

There are two ways to sort an Answerset: quick sort or full sort.

  • Click the sort icon at the top of any column, to sort the data by that column only.
  • After sorting, the icon indicates the direction of the sort.

    The output from certain statements, such as EXPLAIN, cannot be sorted this way.

    Full sort allows sorting by data in multiple columns:

    1 Do one of the following:

  • On the toolbar, click .
  • Right-click in the Answerset window, then select Sort.
  • Select Edit > Sort.
  • In the Sort Answerset dialog box, all columns in the active window are presented in the Available Columns list box.

    2 Select the column name in the Available Columns list box, or use the up or down arrow keys to highlight the column name and press Enter or click the Add button.

    This moves the column name to the Sort keys list box.

    By default, the sort direction for this new sort column is ascending.

    If you click a column in the Sort Keys list box, or select the item using the arrow keys or mouse and press Enter, it reverses to descending sort order.

    3 To remove a sort column from the list, double-click the column name, or select it and press the Delete key or click the Remove button.

    You can also remove all columns from the Sort Keys list by pressing the Clear button.

    4 After you select the columns by which you want to sort and the direction in which you want to sort, click Sort.