PL/SQL-Function or Procedure
Hi!
I need to create a PL/SQL-Function or procedure that checks the database (10g) for (all) connections for a flight route. The function or procedure should be designed to get the outbound and return flights and store the information in a new table (maybe temporary table). Or course, there are several flights for a given route, depending on date and price. But let's use this sample data for now:
Flight_availability
conn_id carrier_id flight_no origin departure destination arrival flight_date
1 BA 235 LHR 07:10 JFK 9:00 20-Jul-07
2 UA 712 JFK 12:00 LAX 18:00 20-Jul-07
3 UA 710 LAX 08:00 JFK 14:00 08-AUG-07
4 BA 237 JFK 16:30 LHR 06:30 09-AUG-07
Flight_route
route_id route_description
1 London-Heathrow (LHR) to Los Angeles (LAX)
2 Los Angeles (LAX) to London-Heathrow
Flight_segment
route_id segment_id conn_id
1 1 1
1 2 2
2 1 3
2 2 4
Would appreciate any help! Sorry for the formatting!
Thank you!