Tutorial 4
Adding a filter to a query
Sun, 02/07/2010 – 03:50 — NuVu Support Team
This tutorial assumes you have the knowledge gained from working with the previous tutorials. After this tutorial you will have the ability to filter the results of the query based on an advised filter criteria. Our example is going to exclude all results where the Country is “Austria”.
Perform the following steps:
- If the Query Designer Tool is already running, please close it down. Invoke the NuVu Query Designer from the NuVu Query program group from the windows Start menu. The main NuVu Query Designer window will be displayed, and a welcome dialog window will also be displayed that shows recently saved/opened queries. We are going to create a new query from the previous query (tutorial3), so double-click on the ‘tutorial3′ item that should be displayed inside the Welcome dialog window (if you have successfully performed the previous tutorial and saved it as specified in that tutorial with a name of‘tutorial3′). The original query will open inside the Designer. We need to now save this as ‘tutorial4′ before we start working with the query, so click on theFile->Save As menu item and advise a new Query name of tutorial3 when the save properties are displayed.Click the button to save the query with the new advised name (tutorial4).
- Click the (filter) button on the toolbar to invoke the filter dialog window. The filter dialog allows you to specify the row (record) selections that must take place before the results are returned to you for display.
- The filter dialog window will show all tables that have been selected for the query, with the ability to advise specific filter criteria for each table. Our example only has a single table (Customer) so it is just a matter of double-clicking on the field that we wish to filter on (in the example, we are wanting to filter out all customers that belong to the country “Austria“, so first double-click on the ‘Country‘ field in the displayed list of fields to automatically copy that field into the selection criteria editor, and then add ‘ <> “Austria”‘ after the Country field, as shown in the following screenshot:
- Click the button to close the filter dialog window and return you to the main Query window.
- Click the button to start execution of the query. A dialog window will appear briefly indicating the various steps that are being performed. Once the query results have been retrieved, this dialog window will disappear and the results will be shown inside the grid on the designer window, as shown below:
- Note the new query will show all countries except ‘Austria”. Compare this to the results obtained in the previous tutorial.
- Finally we will save the changes made to this query (as this will form the base query for the next tutorial), so simply click the button and close down the query tool.
We are complete with the tutorial. An exported query containing this tutorial is available by right-clicking here and choosing Save Link As (Firefox) or Save Target As (Internet Explorer) to save the query import format file to a file on your hard disk, and then importing that query into the query tool (hint: choose File->Import Query from the main menu of the Query Designer).
End of Tutorial