Secure Query: Sorting records
The Sort Records tab lists previously saved sorts for the selected query. If you have not selected a sort option for your query, only Sorted by current record order displays in the list, so the data is displayed in the same order as it appears in your tables.
Sorting means placing data in some kind of order to help you find and evaluate it. You define the field or fields you want the sort to be based on and the sort direction.
- In single field sorting, all the records used in the query are sorted based on the values in a single field. Sorting a query by employee last name is an example of a single field sort.
- In multiple field sorts, Secure Query first sorts the records based on the values in the first field. If two or more records have the same field value in the first sort field, those records are then sorted based on the value in the second sort field.
Sort Direction refers to the order in which the values are displayed when they are sorted.
- Ascending order means smallest to largest (1 to 9, A to Z).
- Descending order means largest to smallest (9 to 1, Z to A).
The fields you select for sorting automatically defaults to ascending order. "(DESC)" next to the field name indicates that the values in the field are sorted in descending order.
- On the Sort Records tab, click the Select Order button.
- In the Select Sorting Order window, select the fields you want to use for sorting in the query from the Fields to pick from list. Either double-click the fields or press the Shift and Ctrl keys as you select the fields and click Select. The selected fields appear in the Fields to sort records by list (and their corresponding sort order) on the right in the order you selected them; this is the order that the fields will be sorted by in your query. (To remove a field from the Fields to sort records by list, highlight it and click Remove or double-click it.)
- If needed, change the order of the sort fields by moving your cursor over the button to the left of the field until you see a two-headed arrow. Then press your left mouse button and drag the field to the new position. When you release the mouse button, the field moves to the new position and the other fields automatically reorder to accommodate the moved field.
- Click the Sort Asc/Desc button to change the sort order.
- Click OK.