Nested Inner Joins

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nkew
    New Member
    • Nov 2006
    • 1

    Nested Inner Joins

    Hi folks,

    I have three tables:

    ActivityCalls, UserList, and People

    UserList.Userna me and ActivityCalls.U sername are 'INNER JOINED' to determine which user is attached to an activity.

    What I want to do is go one step further and look up the People.PersonNa me from people.

    Here's what I have so far but it doesn't seem to work... Am I on the wrong track here?

    INNER JOIN (People INNER JOIN UserList ON UserList.User_U sername=Activit yCalls.Username )
    ON People.Person_I D=UserList.Pers on_ID

    Any help would be greatly appreciated.

    Thanks

    Nick
  • willakawill
    Top Contributor
    • Oct 2006
    • 1646

    #2
    Originally posted by nkew
    Hi folks,

    I have three tables:

    ActivityCalls, UserList, and People

    UserList.Userna me and ActivityCalls.U sername are 'INNER JOINED' to determine which user is attached to an activity.

    What I want to do is go one step further and look up the People.PersonNa me from people.

    Here's what I have so far but it doesn't seem to work... Am I on the wrong track here?

    INNER JOIN (People INNER JOIN UserList ON UserList.User_U sername=Activit yCalls.Username )
    ON People.Person_I D=UserList.Pers on_ID

    Any help would be greatly appreciated.

    Thanks

    Nick
    Hi Nick
    This might work:

    FROM UserList U
    INNER JOIN ActivityCalls A
    ON U.User_Username = A.Username
    INNER JOIN People P
    ON U.User_PersonID = P.Person_ID

    Comment

    Working...