I have following two tables
Table1
refcode CityCode
1240 2240
1340 2340
1440 2440
Table2
CityCode1 CityCode2 Distance
2240 2340 100
2340 2440 200
I want to get output like this
refcode1 RefCode2 Distance
1240 1340 100
1340 1440 200
How should I write SQL?
Regards
Amer
Table1
refcode CityCode
1240 2240
1340 2340
1440 2440
Table2
CityCode1 CityCode2 Distance
2240 2340 100
2340 2440 200
I want to get output like this
refcode1 RefCode2 Distance
1240 1340 100
1340 1440 200
How should I write SQL?
Regards
Amer