What i am trying to achieve is i have a company table that has 2 userid field(userid and updated userid) i am trying to use left join to get the 2 names from the UserTable here are the structure of my tables
[CompanyTable]
CompanyID
UserID:int
UpdatedBy:int
[UserTable]
UserID:int
FullName:string
i got 1 working but can't get the second value here are the code i am trying to do please any help would be awesome!!
SELECT company.CompanyID, company.UserID, company.UpdatedBy, users.FullName
FROM company
LEFT JOIN users ON users.UserID = company.UserID
LEFT JOIN users ON users.UserID = UpdatedBy.UserID
GROUP BY company.CompanyID