CS102, Fall 2000, Day 12, Tuesday, November 28
IN CLASS:
Thanks to all the trendsetters who showed up last Tuesday! I've
decided to not count that as an "absence" and to give each person who was
there a "bonus mark" for attending (good to
annull one absence or late.)
Projects: I have some samples done in previous years, if
you want to see what I expect. Ask me to show you some.
Tutorial 4: See Day 11
Tutorial 5:
Session 1: lookup, and queries
-
pp.5.4-5.8 Lookup wizard A nice way of substituting
human-intelligible labels (customer names) for machine-suitable labels
(customer numbers) for the humans, while keeping the machine labels working
underneath. On p. 5.6, Fig. 5.4, you need to have checked "Hide key
column" to get the results you want.
--What's the name from? If you couldn't do this on the computer,
you'd have to have a lookup table --customer numbers next to
the names, such as a person would have to use who was doing this by
hand.
--I tried and tried to get it to show us both the number and name,
and could not. If you want that I guess you have to make a query
or a report form with the two columns.
-
pp. 5.8-11 More query criteria: Like, In, Not The syntax here
is quite delicate. Some pointers:
-
* and ? are inside the quotes
-
comma, separating items in a list after In, is outside the quotes
(not American standard English)
-
" and ' both work for quotes.
-
Not = for one criterion, Not In
for a list.
-
Most queries are not case-sensitive, that is, 'brown' or 'BROWN'
or 'BRown' all give the same result.
-
p. 5.11, 5.12: PRINT these queries to HAND IN, but first go to Page Setup
and change the Page orientation to Landscape, so it fits on one page.
-
p. 5.12-14: And, Or : Remember items on the same criterion
row get treated as And; items on different rows get treated as Or.
The trick they use here is to use Logic. "Invoice unpaid" AND
("in Indiana" OR "in Ohio") is logically equivalent to ("Invoice unpaid"
AND "in Indiana") OR ("Invoice unpaid" AND "in Ohio")
-
Advanced ideas, not in text: You can use the logical
connectives And and Or within a column, the way you did Not. For
instance, if you were trying to remember a place with "b" in the name,
and you knew it was called a "Restaurant",
(Like '*Rest*' )And (Like '*b*') in
the Customer Name column would get you all the possibilities. Try
it. Try some other queries. What customers are not called restaurants
and have a 'c' in the name?
-
p.5.14-15 : Parameter query: This is cute. Note you
use the square brackets to signal a parameter, not parentheses,
which are used for logical things.
PRINT to HAND IN the unpaid with late charge accounts from Michigan (MI)
Next (and last) will be Session 5.2, a custom form. If you
are up to here, work on homework assignments or on your projects.
Assignment 12, parts from Session 1:
-
p. 5.11, 5.12: PRINT these queries to HAND IN, but first go to Page Setup
and change the Page orientation to Landscape, so it fits on one page.
-
After p. 5.15 PRINT to HAND IN the unpaid with late charge accounts from
Michigan (MI)
-
Design a query that will get you all the orders for the Roadhouse Restaurant,
and print it. It should include the new order you added on p. 5.7.
To Sievers Home Page
CS102-Fall00/Day12.htm 11/27/00
This page belongs to Sally Sievers who is solely responsible
for its content. Please see our statement
of responsibility.