User table has userid and Username columns. Location table has createduserid and modifieduserid columns.
I want to display createdusername and modifieduser using join between these two tables.
This is my query:
SELECT Top
CU.UserName AS [Created UserName], LG.CreatedBy,
cu.UserName AS [Modified UserName], lg.ModifiedBy
FROM
locationtablep as LG
JOIN
Usertable as CU ON CU.CoreUserID = lg.ModifiedBy
Using this query I get only Modified user name but not the createduser name.
Help me to get both username in single query?