![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |
An ORDERED clause can be used in conjunction with a WHERE clause to retrieve occurrences in a specific order using the operators ASCENDING or DESCENDING.By default a table is ordered in ascending order by primary key, although this can be changed in the table definition.
• If an ASCENDING or DESCENDING operator is not specific, the order returned is ascending.
• Multiple ORDERED clauses can be used in one access statement. Use the AND (&) operator to join the clauses.
• If seven or more ORDERED clauses are used in a table access statement, the external sort program setup for your TIBCO Object Service Broker installation is used to sort the values. In this case, the total number of bytes occupied by all control fields must not exceed 4088 bytes.
1.
2.
• Example 1 orders the occurrences of the MIDWEST instance of the EMPLOYEES table in descending order of LNAME field, and then retrieves the first occurrence whose DEPTNO equals the value of the DEPT field of the INPUT table.
• Example 2 retrieves the occurrences in descending values of the field PRICE, then by ascending values of the field MODEL, and then by ascending values of the primary key (the default for ordering is ascending).TIBCO Object Service Broker Managing Data about TIBCO Object Service Broker tables.
![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |