I have the following query. It works fine, but I need to pull the BUserName from another table named FB, which has a UserID field that is associated with the UserID in the FU table. Is it possible?
SELECT TOP 100 FF.XID, FF.YID, FF.Title, FF.FileName, FF.FilePath, FU.UserName as FUUserName, FU.UserName as BUserName FROM FF INNER JOIN FU ON FU.UserID = FF.UserID
Just to clarify. I do not have a UserName column in the FB table. This one has an FB.UserID that is related to FF.UserID where I want to pull the second UserName. Therefore, with this relationship, I am trying to pull the username from the FF.UserID table, which is associated with the user ID in the FB table. Does that make sense?
source share