PL/SQL (MOSC)

MOSC Banner

Email option through TRIIGER

edited May 3, 2012 9:39AM in PL/SQL (MOSC) 5 commentsAnswered
HI ALl,

i created a user defined database trigger on task table for the column status and send pout an email when the status gets (data loading)finished.

status column values:

0=new

1=Deffered

2=running

3=finished

4=error

5=ignore.

My query looks like this:

CREATE OR REPLACE 'TRIGGER ALERT_LOADING

AFTER UPDATE ON TASK
DECLARE

CURSOR C1 is SELECT status from task  ;
BEGIN

FOR X in C1 loop

if X.status=3 
then
mail_pkg.send

(p_sender_email => 'xxx@abc..com''

p_from => ''Oracle Database Account ''XXX@abc.com''

p_to => mail_pkg.array( ''YYY@bbc.com''),

--p_cc => mail_pkg.array( )

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