

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

rem *                                                                   *

rem *             Copyright (c) Ultra Electronics Airport Systems       *

rem *                           All rights reserved.                    *

rem *                                                                   *

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

rem *                                                                   *

rem * Filename:             reallocate_summary_v.sql                    *

rem * Module Name:          reallocate_summary                          *

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 merge flight, information shown at the top of  *

rem * the merge ULD and merge bag 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 reallocate_summary_v

CREATE OR REPLACE FORCE VIEW
  reallocate_summary_v
AS
SELECT
  flight.flight_id,
  flight_no || ' '|| flight.flight_date ||' '|| flight.flight_sch_time FLIGHT,
  get_dep_stand (flight.flight_no, flight.flight_date, flight.site_id) STAND, 
  count_bags(flight.flight_id, 0) NO_BAGS,
  count_bags(flight.flight_id, 1) NO_BAG_EXCEPS,
  flight_access.agent_code 
FROM
    flight ,
    flight_access
WHERE 
    flight.flight_id = flight_access.flight_id;
