Displaying progress records by sorting using any one attribute
Asked Answered
M

1

8

Displaying progress records by sorting using any one attribute. I am new to progress so I want to know that how records in table can be displayed according to sorting on one attribute.

Manyplies answered 8/9, 2011 at 12:40 Comment(0)
C
11

You use the BY phrase like so:

for each customer no-lock where customer.custNum > 100 BY customer.name:
  display customer.custNum customer.name.
end.

Keep in mind that selection and sorting are two different things -- the WHERE clause specifies selection (and in the absence of BY specifies the sort order), the BY specifies sorting.

BY will influence index selection only if there is a tie between two or more possibilities in the WHERE clause.

If the BY order does not match the WHERE order client side sorting may cause a significant performance penalty. (You can compile with XREF to see what indexes are being used and how well they match your desires.)

Creeper answered 8/9, 2011 at 13:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.