|
This command is used to specify the order for sorting the matching data of a catenated Select instruction ('select', 'where', 'order_by', 'exec_select'). Any number of sorting criteria is possible. |
|||
![]() |
This command must not be called with a conditional instruction. | |||
Syntax: |
||||
order_by({ORD_LIST}) | ||||
I/O parameters: |
||||
Return value: |
||||
|
||||
Example: |
||||
Declaration of Variables | ||||
10 select(EP_DOC_CID) 20 where("T_DOC_DAT.DOCUMENT_ID"="EP-00050")) 30 order_by ("T_DOC_DAT.DOC_VERSION"+,"T_DOC_DAT.DOC_REVISION"-) 40 RES = exec_select() |
||||
Result: | ||||
First, the selected records are sorted in ascending order of the table field "T_DOC_DAT.DOC_VERSION" and then in descending order of the table field "T_DOC_DAT.DOC_REVISION". | ||||
![]() |
Functions and commands: DB/Mask Interface |