Skip to main content

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:

DateTypeAmount
2007-01-0120050.00
2007-01-0120055.00
2007-01-0120180.00
2007.01-0120290.00
2007-01-0220499.00
2007-01-0220060.00
2007-01-0220090.00
2007-01-0220189.00
2007-01-0220292.00
2007-01-0220433.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.

DateTypeAmount
2007-01-0120050.00
2007-01-0120055.00
2007-01-0120180.00
2007-01-0120290.00
374.00
2007-01-0220499.00
2007-01-0220060.00
2007-01-0220090.00
2007-01-0220189.00
2007-01-0220292.00
2007-01-0220433.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.