CCNC/CCNC Module 5/Retrieving data with queries/Basic Query Operations/Query Filters

From WikiEducator
Jump to: navigation, search
Tutorial.png Basic Query Operations 

Retrieving Data | Using Query Filters | Sorting Data | Using the Query Wizard | Self Assessment | Summary & FAQs


Using Query Filters

Icon objectives.jpg

Outcomes

Upon completion of this tutorial the learner will be able to:
  • Describe filtering
  • Apply a variety of filters
  • Create a standard filter
  • Remove filters


Applying Filters

Figure 1. Opening a Table

Filtering allows you to work with selected records. In other words the rest of the database remains hidden while only the records you want to work with are visible. To apply a filter open the table to be filtered.

Figure 2. Applying Filters

There are four icons for filtering on the Standard Toolbar. These are;

  1. AutoFilter - which filters the whole table for the value that is highlighted.
  2. Apply Filter - which applies the filter currently active.
  3. Standard Filter - which sets the filters parameters.
  4. Remove Filter - which removes the currently applied filter.


Approaches to Filtering

Oo-dbms-queries-filter-AutoFilter.jpg

The AutoFilter filters the whole databse table for the value that is highlighted. This can be very useful when looking for individual or sets of records for a given value.

Oo-dbms-queries-filter-ApplyFilter.jpg

The Apply Filter uses the last applied filter and runs it again. This is useful when looking for specific values and need to refer back to all the data in the table. This used in combination with Remove Filter allows you to "toggle" between the filtered data and all the data.

Oo-dbms-queries-filter-RemoveFilter.jpg

The Remove Filter will return the table to include all the data as it was before the filter was applied. Keep in mind filters do not delete (remove) the data they just keep in hidden. (Note: The Remove Filter button is also used to remove a sort.)

The Standard Filter

Oo-dbms-queries-filter-StandardFilter.jpg

The Standard Filter presents a dialog which allows the entry of parameters to create a multi-field and multi-value filter. It could be considered an advanced filtering capability.

Figure 3. Standard Filter Dialog

In the Standard Filter dialog fields to be filtered can be chosen, criteria can be selected and values can be set on more than one and up to three fields.

Test your knowledge



Icon qmark.gif

Filtering...

 

1. Which of the following is not a filter activity?.

(a) Standard Filter
Incorrect, There is no (c) Assign Filter. Click here to review the topic.
(b) Remove Filter
Incorrect, There is no (c) Assign Filter. Click here to review the topic.
(c) Assign Filter
Absolutely correct!
(d) Apply Filter
Incorrect, There is no (c) Assign Filter. Click here to review the topic.
(e) Auto Filter
Incorrect, There is no (c) Assign Filter. Click here to review the topic.

2. The standard filter allows for only one criteria?

TRUE
Incorrect, the standard filter allows for three criteria. Click here to review the topic.
FALSE
Absolutely Correct!

Your score is 0 / 0