1°) | Open the "Asp Professional Recordset Wizard" panel (see example in Create Recordset with Simple select query) | |
| |
2°) | In the Field Recordset write the name of the Recordset |
| |
3°)
| Select a valid connections |
| |
4°) | Click on the "Add Table " button to insert the table |
| |
5°) | In the "Table List Menu" select the table whose data you want to work with. |
| |
6°) | Double click on the fields you want add to your query |
| |
7°) | Click on the Total button. The Total row will be displayed |
| |
8°) | For each field in the design grid, click its cell in the Total row, and then click one of the following aggregate functions: Sum, Avg, Min, Max, Count, StDev or Var
When you use an aggregate function on a field, the Extension combines the function and the field names to name the field in the datasheet (for example, AvgOfFreight). For information on renaming these fields to better indicate their contents, click Here.
If you add a calculated field that includes one or more aggregate functions to a query in which you're calculating totals on all the records, you must set the calculated field's Total cell to Expression. |
| |
9°) | Specify the criteria that limit records if requested |
| |
10°) | Select a sort order in the Sort cell for the fields you want to sort |
| |
11°) | To view the result query code click on the "SQL" button Click the Test button to execute the query and ensure that it retrieves the information you intended (Remember the test mode work without criteria) |
| |
12°) | Click the "OK" Button The newly defined Query statement appears in the Bindings panel. |
| |
| Grafic Example:
|
| |
The corresponding code inserted in Your page:
|
| |