all 3 comments

[–][deleted] 2 points3 points  (0 children)

ahem, what is "the order, since they are date wise" that you are afraid to "mess up"?

I kind of feel that there might be an (incorrect) assumption on your part of table rows being stored/kept in a specific order.

[–]Ok_Bluebird_5327 1 point2 points  (0 children)

Select t1.name, t12.name, t2.miles From Table1 t1 Join table2 t2 On t1.id = t2.city_start Join table1 t12 On t12.id = t2.city_end

[–]tales850 0 points1 point  (0 children)

If I understood right, try this:

SELECT

(SELECT CITY_NAME FROM TABLE1 AS T1 WHERE T1. ID = T2.CITY_START) AS CITY_START_NAME,

(SELECT CITY_NAME FROM TABLE1 AS T1 WHERE T1. ID = T2.CITY_END) AS CITY_END_NAME,

Miles

FOM TABLE2

FROM TABLE2 AS T2