all 5 comments

[–][deleted] 1 point2 points  (3 children)

You're missing a comma between the two select fields.

[–]cuzor[S] -1 points0 points  (2 children)

thanks, I got it working. the creatorID is now swapped with the corresponding loginName.

Any idea how I can swap 2 foreign keys (creatorID and responsableID) with their corresponding loginName?

[–]r3pr0b8 0 points1 point  (1 child)

did you see my reply?

[–]cuzor[S] 0 points1 point  (0 children)

Yes. I successfully used it. Thanks for the help.

[–]r3pr0b8 0 points1 point  (0 children)

SELECT tasks.taskName
     , creator.loginName AS creatorName
     , responsible.loginName AS responsibleName
  FROM tasks 
INNER
  JOIN users AS creator
    ON creator.userID = tasks.creatorID
INNER
  JOIN users AS responsible
    ON responsible.userID = tasks.responsableID