Working with databases/Database queries/Advanced queries
Working with databases | |
---|---|
Database queries | Introduction | Simple queries | Modifying queries | Advanced queries | Key points | Assessment |
Contents
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.
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.
Please note: the following tutorial will open in a new window/tab. When you have finished the tutorial, simply close the window/tab and you'll return to this page. You might like to check out the following online tutorial for more information about advanced queries:
|
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
The following practice assessment will consolidate all of your learning so far. You must complete this exercise before attempting the assessment for unit standard 2786. Please read the instructions carefully and review anything you are not sure of. You are to create a new database to record student marks for coursework and assessments. The following table of information is provided: You are to:
Your query for this will have four criteria.
|