PL/SQL (MOSC)

MOSC Banner

Trigger to notify changes

edited Jul 21, 2009 6:31AM in PL/SQL (MOSC) 4 commentsAnswered
 I make a trigger that sends e-mail when a new employee is registered or amending the sector.

When a new employee is registered, the sector is not informed. The field is null. After,the sector is registered. How do I verify the change?

 My trigger is this:

if (:old.unid_lot is null)
      then
        if (:new.unid_lot is not null)
           then
             select ds into lot_new
             from setor
             where cd = :new.unid_lot;
       
             strmensagem := 'Employee : ' ||:new.nom||utl_tcp.CRLF;
             strmensagem := strmensagem || 'Sector : '||lot_new||utl_tcp.CRLF;
             prc_email('xxx@xxxx.XXXX', 'New Employee',strmensagem);
        end if;

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center