Queries - Oncourse

advertisement
Exam Review –
Queries & MORE!
Access SimNet Exam
Access Case Exam
Final Exam
Access SimNet
Exam
DO the Access
SimNet
Lesson!
Access SimNet Exam Tips:
Read Carefully
Some tips and hints you
see in Access may not be
visible in SimNet!
If it says to enter
something and Save it;
be sure you click Save!
Know the Views!
Which view are you in?
Some buttons show as
compressed groups in
the Ribbon!
Some questions require
multiple steps!
If it says to create a
query & run it; be sure
you click run!
You get 5 tries for each
question!
Access Case Exam
Review the
following!
Queries!
Simple
Exact Match
Not Exact Match
<>, >,>=, <, <=, =
And
Or
Between Dates
Before a Date
After a Date
Calculated Field – Simple
Math
Aggregate Functions
Aggregate Functions –
Grouped
Pattern Match
List of Values
Not List of Values
Combination And / Or
Calculated Field –
Conditional
Parameter
Parameter to Return ALL
Crosstab
Find Duplicates
Find Unmatched
Top Value
Queries – Simple
(Tutorial 1 – Page AC 28)
How to Create?
Query Wizard
How to enter criteria?
N/A
Criteria Example:
N/A
Queries – Exact Match
(Tutorial 3 – Page AC 132)
How to Create?
Query Design
How to enter criteria?
Exact text on criteria
line. “Text Field” in
quotes.
Criteria Example:
“Holland”
Queries – Not Exact Match
(Tutorial 3 – Page AC 132)
How to Create?
Query Design
How to enter criteria?
Put Not in front of exact
text on criteria line.
“Text Field” in quotes.
Criteria Example:
Not “Holland”
Queries – Comparison Operators
<>, <, <=, >, >=, = (Tutorial 3 – Page AC 139)
How to Create?
Query Design
How to enter criteria?
Use correct comparison
operator followed by
value
Criteria Example:
>=25000
Queries – Multiple Selection Criteria - AND
(Tutorial 3 – Page AC 142)
How to Create?
Query Design
How to enter criteria?
Both criteria on the
same criteria row.
Criteria Example:
>=25000 AND “Lansing”
Both on same criteria
line.
Queries – Multiple Selection Criteria - OR
(Tutorial 3 – Page AC 144)
How to Create?
Query Design
How to enter criteria?
One criteria on Criteria
line; the other on the Or
line.
Criteria Example:
>=25000 OR “Lansing”
>=25000 on criteria line
“Lansing” on Or line
Queries – Between Dates
(Tutorial 3 – Page AC 144)
How to Create?
Query Design
How to enter criteria?
Between #date# And
#date#
Criteria Example:
Between #11/1/2011#
And #12/31/2011#
Queries – Before a Date
How to Create?
Query Design
How to enter criteria?
< #date#
Criteria Example:
< #12/31/2011#
Queries – After a Date
How to Create?
Query Design
How to enter criteria?
> #date#
Criteria Example:
> #12/31/2011#
Queries – Calculated Fields – Simple Math
(Tutorial 3 – Page AC 147)
How to Create?
Query Design
How to name the
calculated field?
Name: prior to formula
Simple Math Formula:
[InvoiceAmt] *.03
[Rate]/[NumberPeople]
NOTE: Field names in []
Queries – Aggregate Functions
(Tutorial 3 – Page AC 152)
How to Create?
Query Design
How to enter Aggregate
Functions?
Add the Total Row.
Select Aggregate
function for fields.
Queries – Aggregate Functions - Grouped
(Tutorial 3 – Page AC 154)
How to Create?
Query Design
How to enter Aggregate
Functions?
Add the Total Row.
Select Aggregate
function for fields.
How to group the
Aggregate Functions?
Add a field to Group by.
Select Group by in total
row.
Queries – Pattern Match
(Tutorial 5 – Page AC 221)
How to Create?
Query Design
How to enter criteria?
Begin with Like. Then
inside “ “ put text and
wild card combination.
Criteria Example:
Like “616*”
Queries – Pattern Match (Continued)
Wild Cards
What are the wildcard
options?
*, ?, #
What does * mean?
Any string of characters
(numbers or letters)
What does ? mean?
Any single character
(number or letter)
What does # mean?
Any single digit
(numbers only)
Queries – Pattern Match (Continued)
Wild Card – Examples
East Grand River
Grand Haven
Grand Ledge
*Grand
Grand*
*Grand*
Grand Rapids
Sound Grand Aisle
West Grand
West Grand
(Ends with Grand)
Grand Haven, Grand
Ledge, & Grand Rapids
(Starts with Grand)
ALL!
(Grand anywhere in field)
Queries – List of Values
(Tutorial 5 – Page AC 224)
How to Create?
Query Design
How to enter criteria?
Begin with In. Then
inside () put each value
separated by commas.
Criteria Example:
In (“Holland”,
“Rockford”, “Saugatuck”)
Queries – Not List of Values
(Tutorial 5 – Page AC 225)
How to Create?
Query Design
How to enter criteria?
Put NOT in front of In.
Inside () put each value
separated by commas.
Criteria Example:
Not In (“Holland”,
“Rockford”, “Saugatuck”)
Queries – Combination And / Or
How to Create?
Query Design
How to enter criteria?
Or Criteria is put in as
“List of Values”. And
criteria goes on same
criteria line.
Criteria Example:
In (“France”, “Italy”)
AND In (1700, 2000)
Queries – Combination And / Or (Continued)
Examples: Country could be France or Italy AND the Rate can be
1700 or 2000.
Rec#
1
2
3
4
Country
France
Italy
England
France
Rate
2000
1700
1700
5000
Criteria: In (“France”, “Italy”)
Or:
Criteria:
Or:
“France”
“Italy”
In (1700, 2000)
1&2
1700
2000
NONE!
WHY?
Queries – Combination And / Or (Continued)
Examples: The rate can be less than 2000 or the country can be France and the
rate can be less than 4000
WORK ON THIS ONE!
Rec#
1
2
3
4
Country
France
Italy
England
France
Rate
2000
1700
1700
5000
Criteria: In (“France”, “Italy”)
Or:
Criteria:
Or:
“France”
“Italy”
In (1700, 2000)
1&2
1700
2000
NONE!
WHY?
Queries – Calculated Fields – Conditional
(Tutorial 5 – Page AC 229)
How to Create?
Query Design
How to name the
calculated field?
Name: prior to formula
Immediate If
(Conditional)
IsNull (Is blank)
Concatenate (Combine)
IIf(expression, true, false)
IsNull(expression)
&
Queries – Parameter
(Tutorial 5 – Page AC 233)
How to Create?
Query Design
[Prompting question]
How to enter criteria?
Square brackets placed around
the question
Criteria Example:
[Enter the country]
Queries – Parameter to return ALL if blank
(Tutorial 5 – Page AC 236)
How to Create?
Query Design
How to enter criteria?
Use Pattern Match with
[Prompting question] and
wildcard after what is typed
Criteria Example:
Like [Enter the country] & “*”
Queries – Crosstab
(Tutorial 5 – Page AC 242)
How to Create?
Query Wizard
NOTES:
Read prompts in wizard
carefully!
Look at visual in “Sample
box” to see query as you
build it
Review how to change column headings! (AC245)
Queries – Find Duplicates
(Tutorial 5 – Page AC 246)
How to Create?
Query Wizard
How to enter?
Which fields contain duplicates:
enter at least 2 fields – the fields
that may contain duplicate
information
Which other fields to display:
enter any other fields you want
displayed besides the duplicates
NOTES:
Read prompts in wizard
carefully!
Queries – Find Unmatched
(Tutorial 5 – Page AC 247)
How to Create?
Query Wizard
How to enter?
Question 3: Click on the
common field in each of the 2
tables (or queries), then click the
center match symbol
Matching fields should read:
field1 < = > field2
NOTES:
Read prompts in wizard
carefully!
Queries – Top Value
(Tutorial 5 – Page AC 250)
How to Create?
Query Design
How to enter top
value?
Use the Return box in the
Query Setup Group
(button in Ribbon)
KEY ITEM
You must SORT the records by
the field first.
Top Value Options
Some preset percentages or
number of records . OR Type in a
percentage or number of records.
More than
Queries!
Review the
following!
Know how to do the following:
Create
Custom Forms & Reports
Data Validation
Rules – where &
how to enter and
how to test
Field Validation Rules
Vs.
Table Validation Rules
Establish &
understand table
relationships
Enforce referential integrity
Cascade update related fields
Cascade delete related fields
Know how to do the following:
File Maintenance
Compact & Repair
Backup
Views
Which view am I in?
Which view do I need to be in?
QUERIES!
Practice! Practice! Practice!
Access Case Exam Tips:
Read Carefully
Know how to enter all
fields in a query in 1 step
Make sure criteria are
entered EXACT! (> or >=)
Watch out for
typing errors!
Add only fields
requested to a query!
QUERIES!
PRACTICE! PRACTICE!
Add requested field in
the order specified for
the queries!
Know all queries and
other item in this power
point!
Final Exam
Do
(1) Final Exam Concepts Review
Lesson
(2) Final Exam Excel/Access
Review Lesson
Final Exam
Also still available:
Excel SimNet Lesson
Computing Essentials Lesson 1
Computing Essentials Lesson 2
(Computing Essentials lessons may not be
as helpful, since multiple-choice questions)
Final Exam: SimNet Exam Tips:
Read Carefully
Be aware of compressed
groups!
Some hints may not be
visible!
Review all ribbon tabs for
both software products!
Some questions
require multiple steps!
Make sure you know if
you are in Access or Excel!
Concepts question
multiple-choice – with
1 try.
5 tries per question on Access
and Excel questions!
Download