Once you have selected fields, it is possible to define one or several sort conditions on selected fields only.
Sorting data can play a big role in making a report or form effective and easy to use. This topic explains how to sort records when viewing and designing a query, or report. There may be times when you want to sort data by alphabetical or numerical order. For example, a product catalog that lists the products in alphabetical order or on the basis of unit price is much easier to use than one that lists the items in random order.
What do you want to do?
Change
the order of sorted fields by moving a field
Change
the order of sorted fields without moving a field
Open
the ClicknDECiDE SQL Editor
Once you have selected fields, it is possible to define one or several sort conditions on selected fields only. The sort depends on the data type to be sorted, for example for a numeric sort, an ascending sort displays the record with the smallest value on top and the record with the largest value at the bottom. A descending sort does the opposite.
For a date sort, an ascending sort in the first column displays January at the top and December at the bottom. An ascending sort in the second column displays 1 at the top and 31 at the bottom. A descending sort order does the opposite.
One thing to remember when applying sort orders is that numbers, text, and special characters are sorted according to the selected language and regional settings of your computer, the resulting sort orders might not match your expectations.
To sort a field, perform the steps below:
Ensure the field you want to sort on has been selected. For more information, click here...
Click the blue button in the
Sort column to the left of the field
you want to sort. An ascending sort icon appears by default to indicate
that the sort on the field will be ascending.
To use an ascending sort: leave
the default ascending sort unchanged.
To use a descending sort: click the ascending sort icon in the
Sort column to the left of the field
you want to sort, the descending sort icon will appear
.
To remove a sort order on a field, perform the steps below:
Click
the ascending/
descending icon in
the
Sort
column to the left of the field on which you want to remove the
sort. The
blue
square will appear indicating that the sort order has been removed.
Change the Order of Sorted Fields by Moving a Field
To change the order of sorted by fields by moving a field, perform the steps below:
Select the field you want to move in the data grid.
Hold down the mouse button.
Perform
a drag-and-drop operation and move the field to the location you want.
Release the mouse button. The sort condition will be automatically changed in the SQL Editor. (ORDER BY statement)
Change the Order of Sorted Fields without Moving a Field
To change the order of sorted fields without moving a field, perform the steps below:
Click
the sort icon or click Query>
Order by.... The Order by...
dialog box appears.
Note the fields with a sort will be displayed.
Click
the ascending/
descending icon to the left of the field
name or double-click the field row to modify the sort condition from ascending
to descending or the opposite. box.
Move
a field up or down by clicking the up/
down arrows. The sort condition will be automatically
changed in the SQL Editor. (ORDER BY statement).
See Also |