602SQL Documentation Index  

Selecting and Sorting Records in the Grid

Sorting Records

Double click the header of the column whose values you want to use for sorting the records in the grid. Double click again for reverse sorting. The state is indicated with a small arrow beside the column name. You can sort only according to a single column (fixed-length, you may not sort according to BLOB and CLOB columns). Use the Filter and order window to sort by multiple columns.

Selecting Records

Searching for specific data in a large grid can be a long and difficult process. You can simplify the search by narrowing the record set by specifying a suitable condition on some column values. The Filter and order window allows you to specify conditions. You can access it from the appropriate toolbar button or by the F3 key.

Filter and Order

There are three tabs in the window. The first (Filter) specifies the select condition, the second (Sort) specifies the condition for sorting and the third (By SQL) allows you to specify both conditions directly in SQL syntax. Test the syntax of the design with the Validate button.


This tab serves for the creation of a condition using the column operator value AND column operator value. For more complicated conditions you should create and save your own fixed query or use the By SQL tab.

Choose the table or query column from the combo box in the first grid column called Column. Select the operator in the Oper column and set the value in the last column (for IS NULL do not specify anything else). If you need to use more conditions, you may enter another on the next grid row. Both conditions will be connected with the AND logical operator.


This tab serves for a simplified selection of columns that will be used for sorting. Select a table or query column from the combobox in the first column called Column. In the DESC column select the checkbox if the sorting should be descending. If you want to use more columns for sorting, enter another column for sorting on the next grid row.


Enter the condition on the columns into the WHERE Condition field. If you want to select records that have the actual date in the ORDERDATE column, type the following:

The condition can be as complicated as you wish (as opposed to the Filter tab).

Enter the expression that defines sorting to the ORDER BY Clause field. The notation possibilities are the same as those on the Sort tab. If you want to sort records by the ORDERDATE column starting with the newest, type the following:

orderdate DESC

Undo Selection and Sorting

To undo all constraints and sortings press the appropriate toolbar button or press the Shift+F3 keys. This even undo sorting done by clicking on the column header.