Rocket® Visual COBOL® (formerly a product of Micro Focus or formerly a product of Open Text) documentation, created before Rocket Software acquired certain products from OpenText, may include outdated references to "Micro Focus" or "OpenText", both of which are trademarks of OpenText or its affiliates. Rocket Software is not affiliated with Micro Focus or OpenText and has since rebranded these products as Rocket® products. You may also encounter outdated links in this documentation. If you do, please contact Rocket Support (support@rocketsoftware.com) for assistance.
To sort returned data (an ORDER BY clause)
- In the OpenESQL Assistant, click the Sort tab.
- In the Columns in SELECT list, click a column you want to sort. This list box displays the column name of every column selected for the query.
- Do one of the following:
- Click Asc to sort the column in ascending order.
- Click Desc to sort the column in descending order.
- If you want to generate the query using a number to represent the column name, check Use integers for column names. The column names are still displayed in the Columns in ORDER BY field, but the integer value of the column is generated for the query.
- Insert the sort (ORDER BY clause) into your code by clicking the right-pointing arrow
.
Note:
- Code you place into the right-hand pane also appears automatically in the generated query.
- To remove a sort, click the line of code you want to remove in the right-hand pane,
then click the left-pointing arrow
. This places the sort back into the appropriate fields on the left side of the tab,
enabling you to edit it. Moving sorts from the right-hand to the left-hand pane also
removes the associated COBOL code from the automatically generated query.