ckroon
Posts: 869
|
| Posted: 02/29/2008, 10:54 AM |
|
Ok. I have two tables:
'Classlist'= student_id, firstname, lastname, family_id
"Reimbursement' = reimb_family_id, amount.
I need to do a join on the tables where it will connect the familyid's from both fields and return with the last_name from the classlist table.
But every join I have tried brings back more than one result.. cause there are multiple students in every family.
What is the modifier I a missing?
_________________
Walter Kempees...you are dearly missed. |
 |
 |
datadoit
|
| Posted: 02/29/2008, 11:40 AM |
|
How about:
SELECT DISTINCT(family_id) AS family_id, lastname
FROM Classlist INNER JOIN Reimbursement
ON (Classlist.family_id = Reimbursement.reimb_family_id)
GROUP BY family_id
ORDER BY lastname
|
|
|
 |
ckroon
Posts: 869
|
| Posted: 02/29/2008, 12:53 PM |
|
That did it.

Thank you
_________________
Walter Kempees...you are dearly missed. |
 |
 |
|