Presentation is loading. Please wait.

Presentation is loading. Please wait.

G061 - Queries “The search begins …..”.

Similar presentations


Presentation on theme: "G061 - Queries “The search begins …..”."— Presentation transcript:

1 G061 - Queries “The search begins …..”

2 Learning Objectives: By the end of this topic you should be able to:
describe different types of queries and explain when they might be used; use Access to create a range of queries to meet specific requirements

3 What are Queries? used to search for data
used to combine data from different tables to create a “virtual table” of data used to base a form or report on used to perform calculations on data fields

4 Types of Query There are 2 main types of search query: simple query
search using only 1 parameter complex query search using more than one parameter

5 Simple Query uses a single value (parameter) to search by
e.g. searching for a specific book title

6 Simple Query uses a single value (parameter) to search by
e.g. searching for a specific book title can be a static parameter query parameter is ‘hard-coded’ and can’t be changed

7 Simple Query uses a single value (parameter) to search by
e.g. searching for a specific book title can be a static parameter query parameter is ‘hard-coded’ and can’t be changed e.g. Village = Brixworth

8 Simple Query uses a single value (parameter) to search by
e.g. searching for a specific book title can be a static parameter query parameter is ‘hard-coded’ and can’t be changed e.g. Village = Brixworth

9 Simple Query uses a single value (parameter) to search by
e.g. searching for a specific customer by name can be a dynamic parameter query parameter is supplied at run time

10 Simple Query uses a single value (parameter) to search by
e.g. searching for a specific customer by name can be a dynamic parameter query parameter is supplied at run time dialogue box prompts for the search parameters

11 Complex Query uses several criteria (parameters) to select records
the criteria are linked by Boolean operations: AND, OR, NOT AND is used for records matching both criteria: Colour = Red AND Model = Corsa OR is used for records matching one of the criteria: Colour = Blue OR Colour = Red NOT in front of criterion finds records that don’t match: NOT Colour = Pink

12 Gender = F AND Village = Brixworth
Complex Query Gender = F AND Village = Brixworth

13 Gender = F AND Village = Brixworth
Complex Query Gender = F AND Village = Brixworth

14 Village = Brixworth OR Village = Moulton
Complex Query Village = Brixworth OR Village = Moulton

15 Village = Brixworth OR Village = Moulton
Complex Query Village = Brixworth OR Village = Moulton

16 Query Tasks: download a copy of query demo.mdb from the VLE
right-click & Save target as …. using query demo.mdb create the following: a simple, static parameter query to display a list of all Economics (ECON) books; a simple, dynamic parameter query which allows you to choose the type of book and displays a list of the books of that subject; a complex, static parameter query to display a list of all Chemistry books written by Ramsden; a dynamic complex parameter query which allows you to choose a subject and an author to a display list of books add the query types definitions to your glossary


Download ppt "G061 - Queries “The search begins …..”."

Similar presentations


Ads by Google