Working with databases/Database queries/Advanced queries

Sorting a Query
Like a table, a query can be organised to display information in ascending order (A &rArr; Z) or descending order (Z &rArr; A ) order.

Multiple Criteria
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:


 * Accuracy
 * Do the queries contain the right fields? Have we used the correct criteria? Have we used the appropriate data types? Information is entered accurately?


 * Readability
 * Have we used appropriate and recognisable field names?


 * Presentation
 * 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.)

Summary
You have covered:


 * Creating a simple query
 * Editing your Query – adding Criteria
 * Using the Query Design View.
 * Adding a Criteria
 * CriteriaforNumbers
 * CriteriaforText
 * Sorting a Query
 * Evaluating the database