/*****************************************************************************
*
* Filename         - $Workfile:   carrier_map_triggers.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 carrier_map triggers
*
* Language         - Oracle SQL*Plus script
*
* Classification   - Commercial In Confidence
*
*          (c) Ultra Electronics Limited, 1998
*
*****************************************************************************/
/****************************************************************************
* @(#)$Workfile:   carrier_map_triggers.sql  $  $Revision:   1.1  $
*
* 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/triggers/carrier_map_triggers.svl  $
* 
*    Rev 1.1   21 Jun 2001 15:03:48   tagtrak
* OR:
* CR:
* Re-baseline version 4.0.0 to include patches.
* 
*    Rev 1.0   28 Sep 1998 12:30:14   tagtrak
* OR: 12682
* CR: 12682
* REV:
* Vienna Enhancement - use MACH flight numbers
* Andrew Walker
*
****************************************************************************/

create or replace trigger ti_carrier_map
before insert on carrier_map
for each row
begin

	delete from
		carrier_map 
	where
		airline_code1 = :new.airline_code1 or
		airline_code2 = :new.airline_code1 or
		airline_code1 = :new.airline_code2 or
		airline_code2 = :new.airline_code2;

end;
/
