|
Unit 7. Queries (IV) |
|
Ordering rows |
| To sort the rows in the result of the query we use the Sort: row in QBE grid. Click in the Sort: row on the field, in which you wish to arrange the rows, then select from the drop down list if you want the rows appear in ascending or descending order. If you choose Ascending, rows will be arranged from less to more if the field is numeric, in alphabetical order if the field is Text type, from earlier to later if the field is datetime type; with Descending rows will be arranged in reverse order. We can also perform complex sorts . This means we can sort records by several fields and sort in ascending order by some fields and in descending order by others. When we assign order to severals columns (fields) the rows will be sorted by the first ordered column, for the same value in this column, they are sorted by the second ordered column, and successively.That is, if we want to sort by State and within the same State by City, we need firstly the State column and then the City column in the QBE Grid, and each of them with the ordering mode we want for it. The ordering mode is independant and so a different ordenation can be used for each column. E.g ascending for the State column, and then descending for the City column.
|
| |
| |
|
Page. 7.4 |
|
Legal warning: Authorised on-line use only. It is not allowed the use of these courses in companies or private teaching centres.
|
|
© aulaClic. All rights reserved. Reproduction in any form whatsoever is prohibited.
April-2006.
|