Row repitition problem -_-_-_-_-_

Pharcyde

Arriba Arriba!!!
Local time
Today, 20:48
Joined
Sep 4, 2003
Messages
116
my query links 2 tables. Student Data, and Students-means_of_qualifying: My query runs a list of the students enrolled at university-along with their qualifying degrees.

The list is a little long, because if a student has > 1 degree, it adds that as well, and i only want the 1 record by student. How do I sort this problem?:D
 
Sounds like a many-to-many situation. Many students can have many different degrees; many degrees can be held by many different students.
 
so it does. How do I sort it?
 
Typically, with a many to many siutation, you have one table with student data, and another table with degree data. Then you'd use a "join" table in the "middle" to match up the students with their degrees.

So if your students table looked like this:

ID Name
1   Joe
2   John
3   Alex

and if your degree table looked like this:

ID Name
1   Finance
2   Physics
3   Math


The join table could look like this:

StudentID DegreeID
1            2
2            2
2            3
3            1
2            3
 

Users who are viewing this thread

Back
Top Bottom