Progress
Language Tutorial
for Character
Querying and Sorting Example
Follow these steps for a demonstration of combining sorting options with selection options:
- Open
lt-09-03.p
and run it. The following interface appears:
![]()
- Choose the BY ASCENDING Price button. A browse widget appears with the results of the query. In the status area, notice the message that shows the selection and sorting syntax used in the OPEN QUERY statement.
- Choose the next two buttons.
- Choose Exit, then press SPACEBAR to return to the Procedure Editor.
Here is the code that created the display:
These notes describe querying and sorting to help explain the code:
- The BY phrase sorts the selected records by a non-indexed field, Price. The sort is ascending by default.
- This BY phrase also sorts the selected records by Price, but the DESCENDING option forces a descending sort.
- The USE-INDEX option makes clear to the query which of the defined indexes to use for the sort order. Again, this sort is ascending by default.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |