Help Please !! Simple Query and I cannot get it to work !!

  • Thread starter Thread starter James
  • Start date Start date
J

James

I have 3 tables

Member
MemberLog
Notes

All three use ID to create link, one to many from Member. When I run a
report for member and notes I get the correct results, 3 related records,
however, when I add MemberLog and add a field (date) the result then gives
me 9 records which is not correct....what am I doing wrong?

Thanks
 
James said:
I have 3 tables

Member
MemberLog
Notes

All three use ID to create link, one to many from Member. When I run a
report for member and notes I get the correct results, 3 related records,
however, when I add MemberLog and add a field (date) the result then gives
me 9 records which is not correct....what am I doing wrong?

Thanks

Without knowing the structure of the tables, this is quite difficult to
answer.

If I had to hazard a guess, it looks to me as if:

Member
MemberID
NameLast

MemberLog
MemberID
EntryDate

Notes
MemberID
NoteText


SELECT M1.LastName
,ML1.EntryDate
,N1.NoteText
FROM Member AS M1
INNER JOIN
(MemberLog AS ML1
INNER JOIN
Notes AS N1
ON ML1.MemberID = N1.MemberID)
ON M1.MemberID = ML1.MemberID


If there are three entries in Notes for a single MemberID, and three
entries in MemberLog for a single MemberID, then that'll create nine rows
(every row in MemberLog is matched against every row in Notes, 3 x 3 = 9).

If this is not the case, my apologies, I didn't have a lot to go on.


Sincerely,

Chris O.
 
Back
Top