Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Selecting connecting flights query

user545194Oct 1 2012 — edited Oct 2 2012
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
This post has been answered by Frank Kulash on Oct 2 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 30 2012
Added on Oct 1 2012
9 comments
1,063 views