SQL Wizard - Order records appear
You can specify up to four different columns in which to sort your data on. It is wise when sorting data, the columns appear also in that order, so the end user immediately knows how the data is sorted in the results.
For example, if you were to create a query that shows all the transactions for a particular date range, you wouldn't sort on date, but make the date field be the last column in the query.
Look at this query for example:
Date | Type | Amount |
---|---|---|
2007-01-01 | 200 | 50.00 |
2007-01-01 | 200 | 55.00 |
2007-01-01 | 201 | 80.00 |
2007.01-01 | 202 | 90.00 |
2007-01-02 | 204 | 99.00 |
2007-01-02 | 200 | 60.00 |
2007-01-02 | 200 | 90.00 |
2007-01-02 | 201 | 89.00 |
2007-01-02 | 202 | 92.00 |
2007-01-02 | 204 | 33.00 |
You can clearly see the data is sorted in Date order and then in Type order.
If you have selected to Total Columns on the first screen of the wizard, then you would also be able to Sub Total on this group as well by checking the box to Subtotal on the Group.
Here is an example of the above query, with Sub Totalling on the Date group.
Date | Type | Amount |
---|---|---|
2007-01-01 | 200 | 50.00 |
2007-01-01 | 200 | 55.00 |
2007-01-01 | 201 | 80.00 |
2007-01-01 | 202 | 90.00 |
374.00 | ||
2007-01-02 | 204 | 99.00 |
2007-01-02 | 200 | 60.00 |
2007-01-02 | 200 | 90.00 |
2007-01-02 | 201 | 89.00 |
2007-01-02 | 202 | 92.00 |
2007-01-02 | 204 | 33.00 |
365.00 |
Page Break on this Group - Check this box to insert a page break after sorting the selected field.
For more information on sorting and subtotaling, click here.