I have 2 tables tbMembers and tbMembersAccessLvl
I know that a person may have more that one accesslevel in the
tbMemberAccessLvl, I only want to retrieve the highest number (the access
level can only be 0,1,2).
The statement below is retrieveing the lowest one because its the first one
it comes across.
SELECT tbMembers.MemberId, tbMembers.MemberPass, tbMembers.email,
FROM tbMembers CROSS JOIN tbMemberAccessLvl
WHERE (tbMembers.MemberId = '402195') AND (tbMembers.MemberPass =
How can i get the record that supports the above statement but also gets the
There might be 3 records that have MemberId = '402195' and MemberPass =
'ebony' but i want the one with the highest value in
tbMemberAccessLvl.AccessLvl. Do i need to use the MAX prefix??
I tried SELECT tbMembers.MemberId, tbMembers.MemberPass,
tbMembers.email, MAX(tbMemberAccessLvl.AccessLvl) but the server said I need
a "Group by" not sure how any ideas.