Previous Page | Next Page

Examples

Sorting Your Output

You can specify the order in which you want the output sorted. In this example, you use the query from the last example and change the ordering sequence of the columns in the Output window. From the SQL QUERY COLUMNS window, select View [arrow] Order By.

[ORDER BY COLUMNS window]

Move Before

displays all columns in the Order By Columns list except the currently chosen one. The currently chosen column will be inserted before the column that you select.

Move After

displays all the columns in the Order By Columns list except the currently chosen one. The currently chosen column will be inserted following the column that you select.

Ascending Order

changes the ordering sequence of the selected column's values to ascending (lowest value to highest value).

Descending Order

changes the ordering sequence of the selected column's values to descending.

Build a Column

displays the Build a Column Expression window, which enables you to create a calculated column for use in sorting your output. Use the Build a Column Expression window to create new columns by performing calculations on existing (numeric) columns.


Order By Columns

Select BEGDATE from the Available Columns list. Select the right arrow to move the column to the Order By Columns list. By default, columns are sorted in ascending order, so the abbreviation ASC appears next to the column name in the Order By Columns list. Select BEGDATE ASC and Descending Order to change the ordering sequence.

[Ordering in descending order by BEGDATE]

Select Salary and JOBCODE, and move them to the Order By Columns list.

Move Columns

Select Salary ASC from the Order By Columns list and select Move Before. The Move Columns window appears.

[Move Columns window]

Select BEGDATE and OK. The ORDER BY COLUMNS window appears with Salary first in the Order By Columns list.

[ORDER BY COLUMNS window]

Select OK to return to the SQL QUERY COLUMNS window.

Select View [arrow] Where Conditions for Subset.

The WHERE EXPRESSION window appears. Select Undo four times, until only SALARY LT $18,000 is displayed.

[Using the WHERE EXPRESSION window's Undo feature]

Select OK.


Viewing Your Output

To run your query and view the output in the Output window, select Tools [arrow] Run Query [arrow] Run Immediate.

[Query output]

Previous Page | Next Page | Top of Page