SELECT DISTINCT Table1.Route_No
FROM BusStop_RouteNumber AS Table1
INNER JOIN BusStop_RouteNumber AS Table2
ON Table1.Route_No = Table2.Route_No
WHERE Table1.Bus_Stop = 'From Stop'
AND Table2.Bus_Stop = 'To Stop'
This should work.
If you want most direct bus route you might want to change table design.
I would rather have only one table...
Bus_Route
Route_No
Bus_Stop_Name
Bus_Stop_No (1, 2, 3... etc to determine which no this bus stop is on this route)
Example records will look like :
A1, Convent Garden, 1
A1, Leceister Square, 2
82, North Finchley, 1
82, Tally Ho Corner, 2
....
82, Convent Garden, 12
....
82, Leceister Square, 15
Now if you want to find shortest route from 'Convent Garden' To 'Leceister Square' Following query will work
SELECT Route_No
FROM Bus_Route AS TableFrom
INNER JOIN Bus_Route AS TableTo
ON TableFrom.Route_No = TableTo.Route_No
WHERE TableFrom.Bus_Stop_Name = 'Convent Garden'
AND TableTo.Bus_Stop_Name = 'Leceister Square'
ORDER BY SQR((TableTo.Bus_Stop_No - TableFrom.Bus_Stop_No) * (TableTo.Bus_Stop_No - TableFrom.Bus_Stop_No))
Note:
1. (TableTo.Bus_Stop_No - TableFrom.Bus_Stop_No) might give you negative no
2. SQR = square root function ... I am doing square of the (TableTo.Bus_Stop_No - TableFrom.Bus_Stop_No)
and then finding the square root to make it positive no... you can use other functions depending on database you are using
Hope this all will help..