Ordering and Sorting Returned Data

Using the Statement Builder, you can select the order of the columns in the data returned and you can sort the data within each column. To specify the order of the columns, click a column heading and drag it to the appropriate place on the Results tab. You can also arrange the columns using the Order column on the Select/Sort tab. The order and sort changes you make here are immediately reflected in the syntax of the SQL statement.

By default, the values in the column match the order the columns were added to the SQL statement. For example, 1 indicates the first column, 2, the second, and so on. You can rearrange the columns by changing the values. When you change a value in the Order column, the Statement Builder fetches and displays the data in the order you specified. The order and/or sort changes you make are reflected immediately in the syntax of the SQL statement.

To change a value in the Order column, click a cell in the column and select one of the available numbers. When you change a value, the Statement Builder renumbers (re-orders) the columns.

Sorting Data

You can sort the data in a column by selecting the Sort By check box on the Query Specification tab. When you select this check box, the sort order on the column is set to Ascending by default. To change the sort order to Descending, select this value from the Sort column on the Select/Sort tab.