I have a simple table called 'msg' like this:
USER_TO | USER_FROM | MSG
1 | 5 | hello john
I want to do a lookup of the 'user' table that contains these values:
USER_ID | NAME
1 | bob
2 | sally
5 | john
desired output:
USER_TO | USER_FROM | MSG
bob | john | hello john
I tried to use two LEFT JOIN's but it threw an error saying the user field is not unique. What is the correct SQL to use here to lookup the values of both USER_TO and USER_FROM?





Bookmarks