开发者

Displaying progress records by sorting using any one attribute

Displaying progress records by sorting using any one attribute. I am new to progress so I want to know that h开发者_如何学Goow records in table can be displayed according to sorting on one attribute.


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.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜