CS102, Fall 2000, Day 10, Thursday, November 16
IN CLASS:
Access Tutorial 3: Queries. This chapter is pretty dense.
Reading ahead, or rereading, may help.
Session 1: Joining, sorting, filtering.
-
p. 3.2 Select query: subset of the fields and records (like a filter
in Excel), selects some items from the database.
-
p.3.6-8 Join, One-to-many relationship, Referential integrity: Read
this over carefully; it's at the heart of the theory of how to create databases.
Doing this right gives great power over your data.
-
p.3.10 Enforce referential integrity Trouble?
If it won't let you enforce referential
integrity: Some
Order record is incorrect. In my file, OrderNumber 211 had a nonexistent
Customer Number. The most likely culprits are the 3 records you entered
on p. 2.22. Turn to that page and check that those three records
are correct in the Order table; fix any which is not. This will restore
referential integrity, and you can now enforce it for the future.
-
p. 3.10-12 This is where you learn to combine fields
from more than one table in a query.
-
p. 313-14 Sorting multiple fields: They
will always go from left to right, primary to secondary, so
you have to rearrange them. This is a kludge. Excel's sorting
was slicker.
Session 2: Conditions: comparisons, And, Or, calculations.
Appearance.
-
p.3.19 top: Remember where this list of Comparison
Operators is.
-
p.3.19-20 You build a second query using both
tables. The join you did back at 3.10 is still available.
-
p. 3.24 This trick for And, Or is not obvious.
Same row = And, Different rows = Or.
-
p. 3.30-31 Expressions: I had trouble seeing
the expression in the field in the design grid, till I clicked elsewhere.
#6: You're substituting "LateCharge" for "Expr1". Keep the COLON
between the name and the expression.
To Sievers Home Page
CS102-Fall00/Day10.htm 11/13/00
This page belongs to Sally Sievers who is solely responsible
for its content. Please see our statement
of responsibility.