Easy to Create, Easy to Change - Easy to use!

Support::

in order



Parameters


Returns/Result


Examples


Reference

in order

Type

Sorting Operator

Purpose

The in order operator tells DataEase to process records and display the output in sequence from lowest to highest value in the specified field. (e.g. 01011, before 01012, before 01013, etc.).

Syntax

FIELDNAME in order ;|.

Usage

The in order operator can be used only on list items following the list records command. It cannot be used with the enter a record, modify records, or delete records commands.

The in order operator can be used on any type of field. A Time, Date, or Number field is ordered from lowest to highest value. A Choice field is sorted by Choice number. A Text field is sorted in alphabetical order.

DataEase orders alphanumeric values in standard ASCII sequence and makes no distinction between upper and lower case.

If a script specifies an item to be processed in groups, that item should be listed before all other output items in a script, including items to be sorted in order. When a field is listed in groups, DataEase also sorts the groups in order (e. g., when grouping MEMBERS by STATE, all Alabama members are listed before any Alaska members).

 

Caution

Sorting operators cannot be used in conjunction with the all relational operator (e.g., if RESERVATIONS is the Primary table, you cannot use the statement:

 

all MEMBERS LAST NAME in order ;

 

Example

for RESERVATIONS ;

list records

STATE in groups ;

ZIP CODE in order ;

LAST NAME in order .

end

 

This script tells DataEase: (1) Process all the RESERVATIONS records with the same value in the STATE field together as a group, (2)display the group identifier STATE once at the beginning of each group, (3) within each group, arrange the members in order from lowest to highest ZIP CODE, and (4) within each ZIP CODE, arrange the members in alphabetical order by LAST NAME. A portion of the output from this script might look as follows:

 

 

State

Zip Code

Last Name

...

...

...

DC

 

 

 

20007-3947

Spinelli

 

20036-0000

Dowling

 

20036-8749

Schmidt

DE

 

 

 

19810-3729

Stromboulis

 

19901-3445

Gross

...

...

...

 

See Also


On the forum about in order

On the blog about in order