Fall Semester 2002

Lab Eight, Friday September 27, 2002
Date
Sep 27, 2002

Due today
Project Six (Lab Manual)
Homework Three will be collected.

Starting today
Last Year's Sample Practical

Due next time
Completed Sample Practical (see above)
Homework Three will be collected in lab.

Today's grading (Project Six, Lab Manual)

Creating an Application System Using Macros, Wizards, and the Switchboard Manager

You will have mastered the material in this project when you can:

1. Create and use lookup fields
2. Create and use input masks
3. Add single-field controls to reports and forms
4. Add calculated controls to reports
5. Create, modify, and run macros
6. Create a copy of a macro
7. Create and use a switchboard
8. Modify switchboard pages and items

Today you will receive questions like the ones listed above.

Let's do the problem in stages.

First, can we identify the books with co-authors?

```select bookcode
from wrote
where sequence >= 2
group by bookcode```
That was good practice. Let's use this ability:

```select title, price
from book
where bookcode in (select bookcode
from wrote
where sequence >= 2
group by bookcode)```
That was the list of all titles and prices of books like the ones we want.

Could we print the authors, in order?

```select title, price, authorfirst, authorlast
from book, wrote, author
where book.bookcode = wrote.bookcode and
wrote.authornum = author.authornum
order by book.bookcode, sequence ```
Great! Then we're almost done.

```select title, price, authorfirst, authorlast
from book, wrote, author
where book.bookcode = wrote.bookcode and
wrote.authornum = author.authornum and
book.bookcode in (select bookcode
from wrote
where sequence >= 2
group by bookcode)
order by book.bookcode, sequence```
titlepriceauthorfirstauthorlast
Treasure Chests24.46LonSchleining
Treasure Chests24.46RandyO'Rourke
(Well, OK, perhaps it's exactly backwards - use `DESC`).
Last updated: Sep 22, 2002 by Adrian German for `A114/I111`