/*****************************************************************************
*
* Filename         - $Workfile:   rush_bag_v1.sql  $
*
*                    Name:Yomi Kogbe  Date:29/01/00  Version:1.0 CR: 15006
* Author           - See revision history below.
* Last Update      - See revision history below.
*
* Project Name     - TAGTRAK(Oracle Database)
*
* Source Code
* Identifier       - 0/3/300/8010/112
*
* Design Spec
* Section          - 
*
* Contents         - Live Schema View
*
* Language         - Oracle SQL*Plus script
*
* Classification   - Commercial In Confidence
*
*          (c) Ultra Electronics Limited, 1997
*
*****************************************************************************/

PROMPT Creating view rush_bag_v1;
CREATE OR REPLACE FORCE VIEW rush_bag_v1
(  bag_tag
 , destination
 , class
 , pax_id
 , load_time
 , location
 , uld_number
 , uld_seq
 ,flight_id
 ,booked_flight_id
 ,DELIVERY_INSTR
 ,worldtracer_ref
)
as
SELECT b.bag_tag ,
       b.bag_destination ,
       a.pax_class ,
       a.pax_id,
       to_char(b.time_loaded, 'hh24:mi'),
       c.location_description,
       b.uld_no ,
       b.bag_sequence_no ,
       a.flight_id ,
       a.booked_flight_id,
       b.DELIVERY_INSTR,
       b.worldtracer_ref
 FROM  pax A, bag B, location c
where  b.bag_exception = 'RUSH'
  and  b.delete_marker = 0
  AND  b.authority_to_load_dcs = 'Y'
  AND  A.pax_id = B.pax_id
  and  b.location_code = c.location_code;
