minus, difference, where not exists, resources

A

AndREa

Hi All,
How do I implement a query to compute the difference
between two tables? Using Access2002, I have t1 and t2
and I want those records in t1 that are not also in t2.

In addition, I'm volunteering to write more advanced
queries using Access from school registrar data (id,
course, semester, etc). In particular I'm tring to track
students as they progress in our major. For
example, "What freshman math course did a student start
with?", "How many students passed Course1 and also
Course2?", "What are the chances that a student starting
in Course1 passes Course_n?", ...
Any help is appreciated including resources (online or
texts) that show advanced queries. Thanks,
* AndREa * ([email protected])
 
D

Douglas J. Steele

Records in t1 that aren't in t2 is relatively simple:

SELECT t1.f1, t1.f2 FROM t1 LEFT JOIN t2 ON t1.f1 = t2.f1 WHERE t2.f1 IS
NULL

(or, if you prefer, use the Find Unmatched Query Wizard when you select a
new query)

I'm afraid you don't give enough details for most of the other questions. At
a very minimum, we'd need to know what your tables look like (and, for the
first question, how you'd identify what's a freshman math course)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top