/*****************************************************************************
*
* Filename         - $Workfile:   check_flight.sql  $
*
*                     Name              Date      Version     CR Number
* 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 Stored Procedure check_flight.
*
* Language         - Oracle SQL*Plus script
*
* Classification   - Commercial In Confidence
*
*          (c) Ultra Electronics Limited, 1998
*
*****************************************************************************/
/****************************************************************************
* @(#)$Workfile:   check_flight.sql  $  $Revision:   1.3  $
*
* Revision History
*
* Note that user tagtrak is many users. For these users the user
* name is entered as the last line in the change description.
*
* $Log:   /pvcsarch/db_ora/db/source/live/procedures/check_flight.svl  $
* 
*    Rev 1.3   21 Jun 2001 14:42:10   tagtrak
* OR:
* CR:
* Re-baseline version 4.0.0 to include patches.
* 
*    Rev 1.2   20 Sep 1999 14:40:18   tagtrak
*  
* 
*    Rev 1.1   25 Sep 1998 10:02:48   tagtrak
* OR: 12484
* CR: 12484
* REV:
* Merged Vienna (0.3.1E) and Core Product (0.2.5E) -
* branch ATS revision moved to trunk.
* Andrew Walker
* 
*    Rev 1.0.1.0   18 Aug 1998 11:28:44   tagtrak
* OR: 12484
* CR: 12484
* REV:
* Merging Vienna (0.3.1E) and Core Product (0.2.5E)
* Andrew Walker
*
****************************************************************************/

PROMPT create or replace procedure check_flight

create or replace procedure check_flight (
   p_fltno         in   char,
   p_fltdate       in   char,
   p_siteid        in   number,
   p_fltdir        in   char,
   p_fltid         out  number,
   p_fltstatus     out  char) 
as  
begin

   p_fltid := 0;
   p_fltstatus := '';
 
   select
      flight_id ,
      flight_status
   into
      p_fltid,
      p_fltstatus
   from
      flight
   where
      flight_no   = p_fltno and
      flight_date = p_fltdate and
      site_id     = p_siteid and 
      flight_type = p_fltdir; 

   exception WHEN NO_DATA_FOUND then
      NULL;

end check_flight;
/
