#ifdef PRJ
/*  PRJ_TRI.SRC
 * $Revision$
 * $Id$
 */

CREATE_TRIGGER(prj_t_prj_scenario_b_iu)
BEFORE INSERT OR UPDATE ON prj_scenario
FOR EACH ROW
BEGIN
   UPDATE_PRIMARY_KEY(prj_scenario_key, prj_s_prj_scenario_key);
END;
/

CREATE_TRIGGER(prj_t_prj_scenario_note_b_iu)
BEFORE INSERT OR UPDATE ON prj_scenario_note
FOR EACH ROW
BEGIN
   UPDATE_PRIMARY_KEY(prj_scenario_note_key, prj_s_prj_scenario_note_key);
END;
/

CREATE_TRIGGER(prj_t_prj_ruimte_b_iu)
BEFORE INSERT OR UPDATE ON prj_ruimte
FOR EACH ROW
BEGIN
   UPDATE_PRIMARY_KEY(prj_ruimte_key, prj_s_prj_ruimte_key);
  :new.prj_ruimte_upper_nr := UPPER(:new.prj_ruimte_nr);
END;
/

CREATE_TRIGGER(prj_t_prj_werkplek_b_iu)
BEFORE INSERT OR UPDATE ON prj_werkplek
FOR EACH ROW
BEGIN
   UPDATE_PRIMARY_KEY(prj_werkplek_key, prj_s_prj_werkplek_key);
END;
/

CREATE_TRIGGER(prj_t_prj_ruimteafdeling_b_iu)
BEFORE INSERT OR UPDATE ON prj_ruimteafdeling
FOR EACH ROW
BEGIN
   UPDATE_PRIMARY_KEY(prj_ruimteafdeling_key, prj_s_prj_ruimteafdeling_key);
END;
/

CREATE_TRIGGER(prj_t_prj_perslidwerkplek_b_iu)
BEFORE INSERT OR UPDATE ON prj_perslidwerkplek
FOR EACH ROW
BEGIN
   UPDATE_PRIMARY_KEY(prj_perslidwerkplek_key, prj_s_prj_perslidwerkplek_key);
END;
/

CREATE_TRIGGER(prj_t_prj_deel_b_iu)
BEFORE INSERT OR UPDATE ON prj_deel
FOR EACH ROW
BEGIN
   UPDATE_PRIMARY_KEY(prj_deel_key, prj_s_prj_deel_key);
END;
/

CREATE_TRIGGER(prj_t_prj_selectie_b_iu)
BEFORE INSERT OR UPDATE ON prj_selectie
FOR EACH ROW
BEGIN
   UPDATE_PRIMARY_KEY(prj_selectie_key, prj_s_prj_selectie_key);
END;
/

REGISTERRUN('$Id$')

#endif // PRJ
