Progress
Results User’s Guide
for Windows


Sorting Records

By default, Results uses the primary index from the first table you included in the query to determine the order in which it retrieves and displays records.

The following query displays the items ordered by each customer. Note that Results automatically uses the primary index, Cust-Num, within the Customer table to sort the records in ascending order by customer number:

You can alter the order in which the query retrieves records by choosing one or more fields as the criteria for sorting the records.

For example, you might prefer to see the list sorted by order number, starting with the most recent order. In this case, you use the Order-Num field to sort the records in descending order, as shown in the following example:

Then you might decide that you want to retrieve the orders for each customer, starting with the most recent order. In the Sports database, the order number increases with each new order. Therefore, you use two fields to sort the records: Cust-Num and Order-Num. Cust-Num is sorted in ascending order and Order-Num is sorted in descending order, as shown in the following example:

You can sort on all database fields and on the following types of calculated fields: Math, String Function, Numeric Function, Date Function, and Logical Function. See "Analyzing Data," for more information on the different types of calculated functions.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095