Quantcast
Channel: SQLServerCentral » SQL Server 2012 » SQL Server 2012 - T-SQL » Latest topics
Viewing all articles
Browse latest Browse all 4901

query for routing

$
0
0
I have a table called flights with columns: fltNum, departureCity, depTime, arrivalCity, arrTimeI want to query flights and produce an out put table that depicts the routing from a takeoff city and a land city.I will designate a no earlier than takeoff time, and a no later than land time. I will also designate a minimum of 30 minutes between connections, and a maximum of 3 flights.The output row header is:flt depCity 1 depTime 1 arrCity 1 arrCity 1 flt 2 depCity 2 depTime 2 arrCity 2 arrCity 2 ............ arrCity 3The output will display non-stop flights, 2-flight routings, and 3-flight routingsAny suggestions of creating the query are appreciated.

Viewing all articles
Browse latest Browse all 4901

Trending Articles