I would like to get the name of each buddy I have listed in my tblBuddies table from a subquery.
Select userName From tblIMUser where userID = (Select distinct userbuddy From tblBuddies Where userID = 4)
From this I get a subquery error Any ideas on how to get around this I was thinking of a for Each Loop in the SQL
what do you think
tblIMUser
userID (PK) userName
----------------------
1 Name1
2 Name 2
3 Name 3
tblBuddies
UserID BuddyID
----------------------
1 - 2
1 - 3
3 - 1
3 - 2


Reply With Quote
))
