Working with databases/Database queries/Advanced queries
|Working with databases|
|Database queries||Introduction | Simple queries | Modifying queries | Advanced queries | Key points | Assessment|
Sorting a Query
Like a table, a query can be organised to display information in ascending order (A ⇒ Z) or descending order (Z ⇒ A ) order.
It’s possible to have a query with more than one criteria. For example:
This query identifies books that are hard-covers, and that are published before 1950. Note that Access automatically reformats your date query by putting hash marks around the date.
Note also the Show checkbox: if you un-tick this, the field will not be displayed in the query, although it will still be used in running the query.
Evaluating the database
When evaluating a database we need to keep the following in mind:
- Do the queries contain the right fields? Have we used the correct criteria? Have we used the appropriate data types? Information is entered accurately?
- Have we used appropriate and recognisable field names?
- Information is presented in a clear and legible format especially if creating forms and reports. Use plain English and not jargon.
- Data Integrity
- Information must be entered in a consistent way and be accurate. (Phone numbers entered in the same format, consistent use of abbreviations – eg: St, Street, but not both.)
You have covered:
- Creating a simple query
- Editing your Query – adding Criteria
- Using the Query Design View.
- Adding a Criteria
- Sorting a Query
- Evaluating the database