Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

link back to the same table

Status
Not open for further replies.

kimhoong79

Technical User
Jun 10, 2002
58
MY
I have a table listing out MemberID, MemberName, SponsorID where the SponsorID is from the MemberID as well. I need to create a query to list down the MemberID, MemberName, SponsorID AND "SponsorName"(taken from the same table). Can u let me know how to do? (forgive me for my foolishness as the problem is so tiny, coz I dun hav anyone2refer to.) Can u tell me where I can get good tutorial(on MS Access and/or other stuffs) on the net? thanx a bunch!
 
Assuming that the table is called members and it has these fields :

MemberID, MemberName, SponsorID

This query gives you what you are after:

SELECT Members_1.MemberID, Members_1.MemberName,Members_1.SponserID, Members.MemberName
FROM Members right join Members AS Members_1 on Members.MemberID = Members_1.SponserID


Transcend
[gorgeous]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top