Presentation is loading. Please wait.

Presentation is loading. Please wait.

Queries and query design What are queries? Questions that can be asked of the data in the tables. Questions can draw on one or more tables and can have.

Similar presentations


Presentation on theme: "Queries and query design What are queries? Questions that can be asked of the data in the tables. Questions can draw on one or more tables and can have."— Presentation transcript:

1 Queries and query design What are queries? Questions that can be asked of the data in the tables. Questions can draw on one or more tables and can have criteria defined by the designer OR the user.

2 Types of query 1. Single file query - list all of the customers and their addresses in our table of customers. 2. Query with criteria - list all of our customers who live in Bristol. 3. Multiple file query - draws on two or more tables with relationships: e.g. how many of our customers bought “Munchies” last month? Draws on customers and orders tables.

3 Selected fields Run the query

4

5 A criterion

6 Parameter definition

7

8 Criteria in different datatypes Text - “Munchies” Number - >20 Dates - <#20/2/98# But what happens when you put this in the criteria field? [Enter a product: ]

9 Expressions in criteria To create criteria, build expressions: In numbers: “more than”; = “equal to” <> “not equal to” In dates: “after”. The words AND, OR and NOT can be used: e.g. “Munchies” And “Sweeties”

10


Download ppt "Queries and query design What are queries? Questions that can be asked of the data in the tables. Questions can draw on one or more tables and can have."

Similar presentations


Ads by Google