Suhen,
 
Using PL/SQL cursors, you can build any kind of dynamic string you want, place the result in a PL/SQL variable, and email it to whomever you want.
 
Give an example of your sql select statement, and I'll be glad to help.
 
Tom Mercadante
Oracle Certified Professional
-----Original Message-----
From: Suhen Pather [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 31, 2002 10:25 PM
To: Multiple recipients of list ORACLE-L
Subject: sending email via pl/ sql using query

List,

 

I am trying to send email from Oracle when a table is updated.

The message must be a dynamic one, so hard coded message will not be allowed.

 

I have created a trigger when the table is updated - that works

I am using UTL_SMTP to send emails. -  that works

However this procedure (send_mail) only has hard-coded messages. - I need it to be a dynamic message, from a query which I already have.

The query will return more than 1 row.

 

- So the trigger executes when a column is updated.

- A query would be executed giving the required information to be mailed.

- email program must kick off, emailing the results of the above query.

 

Any ideas how to do this.

 

Thanks & Regards

Suhen

 

 

Reply via email to