access: queries ad-hoc reporting chapter t. access queries queries access properties sorting...

Post on 16-Jan-2016

235 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Access: QueriesAd-hoc

Reporting

Chapter T

Access Queries

Queries

Access

Properties

Sorting

Selection Criteria

Calculations

Objective

▪State the purpose of common table properties.

▪Create queries to support common business problems. (Using Query Design View only)

▪Distinguish between record and summary calculations.

What are Access Objects?

▪Tables

▪Queries

▪Reports

▪Forms

Open XLS in Access – Step 1

Open blank desktop database & name it

Open XLS in Access – Step 2

Load data into new table

Open XLS in Access – Step 3

Open XLS in Access – Step 4

Format Text Fields

Open XLS in Access – Step 5

Add Primary Key

Open XLS in Access – Step 6

Name Table

Example Data

Participant Registration Card

Participant ID: 1

Age:

Gender: Male Female

Are you married? Y or NAre you a parent? Y or NAre you a home owner?Y or N

What is your favorite food?

Example Data

Observation Card

Participant ID #:

Observation Date:

1 = Poor … 5 = Excellent

Rating of Product A: 1 2 3 4 5Rating of Product B: 1 2 3 4 5 Rating of Product C: 1 2 3 4 5 Rating of Product D: 1 2 3 4 5

Open Existing Database

Start Access

Review Tables

Review Relationships

What Table Properties Can I Set?

▪ Field Name

▪Data Type

▪ Field Size

▪ Format (output)

▪Decimal Places

▪ Input Mask

▪Default Value

▪ Validation Rule

▪Required

▪ Indexed

Book Database

What is the Purpose of Queries?

▪Ad-hoc information retrieval

▪Output subsets of data

Start a Query

Example: List demographics of all participants.

Fields

Run a Query

Show & Hide FieldsExample: List demographics of all participants

but hide homeowner field.

Save a Query

Sort RecordsExample: List ratings for Product A from high to low.

Select Records

Example: List demographics of Female participants.

Query More Than One Table

Example: List all observation ratings by female participants.

Selection Criteria: Operators

Example: List demographics of all participants over 30 years of age.

Selection Criteria: * and ?

Example: List demographics of all participants who like liver. Liver may be anywhere in the Favorite Food string; beginning, middle or end.

Selection Criteria: NOT

Example: List demographics of all participants who did not identify ice cream as their favorite food.

Selection Criteria: NULL

Example: List demographics of all participants who did not identify a favorite food.

Selection Criteria: AND

Example: List demographics of female participants who are over thirty.

Selection Criteria: OR

Example: List demographics of participants who are either Female or over 30.

Combine Selection Criteria

Example: List all female participants who are married and all male participants who are parents.

Selection Criteria: Dates

Example: List all observations recorded on Feb 24, 2011.

Summary CalculationsOne calculation total for a group of records.

Example: Calculate the average rating each participant assigned to Product A.

Record Calculations

One calculation per record.

Example: Determine the age of each participant in five years.

Query Limitations

▪Queries can show only one level of grouping at a time.

▪Queries have limited formatting options.

top related