/*****************************************************************************
*
* Filename         - $Workfile:   ti_app_priv.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         - An sqlplus script to generate a primary key
*                    
*
* Language         - Oracle SQL*Plus script
*
* Classification   - Commercial In Confidence
*
*          (c) Ultra Electronics Limited, 2001
*
*****************************************************************************/
/****************************************************************************
* @(#)$Workfile:   ti_app_priv.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/ti_app_priv.svl  $
* 
*    Rev 1.1   21 Jun 2001 15:04:44   tagtrak
* OR:
* CR:
* Re-baseline version 4.0.0 to include patches.
* 
*    Rev 1.0   06 Mar 2001 17:40:12   tagtrak
* OR:
* CR:15398
* REV:
* DESC: Allocate Primary Key for app_priv
* 
*****************************************************************************/

-- File renamed from ti_app_priv.sql - Dave Banks - FALCP/CA/1771 - 8th March 2006

CREATE OR REPLACE TRIGGER ti_app_priv
BEFORE INSERT ON app_priv
FOR EACH ROW
BEGIN
  SELECT app_priv_seq.NEXTVAL INTO :NEW.app_priv_id FROM dual;
END;
/
