/*****************************************************************************
*
* Filename         - $Workfile:   flight_no.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
*
* Language         - Oracle SQL*Plus script
*
* Classification   - Commercial In Confidence
*
*          (c) Ultra Electronics Limited, 1997
*
*****************************************************************************/
/****************************************************************************
* @(#)$Workfile:   flight_no.sql  $  $Revision:   1.7  $
*
* 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:   /shared/pvcs/tagtarch/db_ora/db/source/live/procedures/flight_no.sqv  $
* 
*    Rev 1.7   26 Feb 1999 08:51:22   tagtrak
*  
* 
*    Rev 1.6   02 Apr 1998 19:00:42   tagtrak
*  
* 
*    Rev 1.5   15 Jan 1998 12:12:04   tagtrak
* OR: OR11101, TN13, TN15
* CR:
* REV:
* Phase 2C to Phase 3 upgrade plus code review actions and resolving some technical isses.
* 
*    Rev 1.4   24 Oct 1997 11:05:40   tagtrak
* Added PVCS header information
*
****************************************************************************/

PROMPT create or replace procedure flight_no

create or replace procedure flight_no (
	fltid   in  number,
	fltno   out char,
	fltdate out char
)

as
begin

	/*
	 * - Select flight_no and flight_date from the flight table where the
	 *   flight_id = the fltid parameter.  If no data is found, then
	 *   initialise the variables to an error condition.
	 */

  select
		flight_no,
		flight_date
  into
		fltno,
		fltdate
  from
		flight
  where
		flight_id = fltid;
 
	exception
		when NO_DATA_FOUND then
			fltno    := '-';     --NOT NULL field
			fltdate  := '-';     --NOT NULL field
 
end flight_no;
/
