
rem *********************************************************************

rem *                                                                   *

rem *             Copyright (c) Ultra Electronics Airport Systems       *

rem *                           All rights reserved.                    *

rem *                                                                   *

rem *********************************************************************

rem *                                                                   *

rem * Filename:             flight_sum_arr_info_v.sql                   *

rem * Module Name:          flight_sum_arr_info_v                       *

rem * Subsystem Name:       views                                       *

rem * Originating Author:   James Creegan                               *

rem * Design Reference:     FAS/BBTRK/SD/225                            *

rem *                                                                   *

rem *********************************************************************

rem *                                                                   *

rem * Description:                                                      *

rem *  View required for inbound flight screens                         *

rem *********************************************************************

rem *                                                                   *

rem * Program Identification Array:                                     *

rem *                                                                   *

rem * "%Z%%M% VERSION %I% %E% %U%"

rem *                                                                   *

rem *********************************************************************

rem *                                                                   *

rem * Modification History:                                             *

rem *                                                                   *

rem * Rel Date/Time      Proj/Id   CA Ref/Details Of Change             *

rem * --- -------------- --------  ------------------------------------ *

rem * 1.0 28 May 03                File initially checked in            *

rem *********************************************************************/
PROMPT Creating view flight_sum_arr_info_v

CREATE OR REPLACE FORCE VIEW 
flight_sum_arr_info_v
(flight, 
 stand,
 ulds,
 bags,
 bag_exceptions,
 flight_id)
AS
 SELECT flight_no||' '||flight_date||' '||NVL(flight_est_date, flight_sch_time), 
  get_arr_stand(flight_no, flight_date, inbound_flight_utils.get_inbound_orig_site(flight_id)), 
  count_ulds(flight_id), 
  count_bags(flight_id, 0),
  count_bags(flight_id,1),
  flight_id
 FROM 
   flight_inbound_v1;

