Generating unique records from tables

  • Thread starter Thread starter Peter Jay Salzman
  • Start date Start date
P

Peter Jay Salzman

Dear all,

I have 3 tables: A, B, and C that contain student records. The tables
have the same structure, but they're for different semesters. They all
have a field called SSN (social security number).

I'd like to create a query that generates a list of every unique SSN
from the three tables.

In other words, I want to generate an unduplicated list of all students who
took a class during those three semesters.

Can someone tell me how to do this?

Thanks!
Pete
 
Take a look at a union query.

SELECT SSN
FROM TableA
UNION
SELECT SSN
FROM TableB
UNION
SELECT SSN
FROM TableC

Can't be done using the query grid.

The real problem is that you need to look at redesigning your table structure,
so that you have a Student table and a table for Students in a semester or
Courses or ...
 
Back
Top