Hi,
In our system we have a base table with all connecting flights. Each flight leg(segment) is stored as a record (PK is CID and flight_no), however
both flight segments have the same id (data set). For example:
Segments(Legs)
CID Flight_no From To
----------------------------------------
1 UA123 LAX DEN
1 UA456 DEN JFK
and the routes base table stores the starting and ending point of a flight, but not the stopover:
Routes
From To
-------------
LAX JFK
The problem is finding those connecting flights according to the route.
Help on the sql would be greatly appreciated! Thanks!
Edited by: user545194 on 01.10.2012 11:08