An example is the easiest way to explain what I’m looking to do:
GIVEN:
~move~
id | from | to
--------------
1 | 1 | 2
2 | 1 | 2
3 | 2 | 3
4 | 3 | 1
~locations~
id | name
---------
1 | home
2 | work
3 | out
How can I get:
id | from | to
----------------
1 | home | work
2 | home | work
3 | work | out
4 | out | home
That is, the human-readable name for both the from and to columns.
1 Answer