Page 1 of 1

Alert Sql Help Info

Posted: Tue Apr 03, 2007 10:23 pm
by sgeeta
Hi,
I want the alert email when some one only updates the terms like eg net 30 to net 20. Now if I update any thing it sends an email I dont want that any advice.

EVENT ALERT TABLE NAME: PO_VENDOR_SITES_ALL
SELECT
PV.SEGMENT1,
PV.VENDOR_NAME,
PV.LAST_UPDATE_DATE,
AA.NAME,
U.DESCRIPTION
INTO
&VNUM
&VNAME
&UDATE
&TNAME
&WHO
FROM PO_VENDORS PV, AP_TERMS AA,FND_USER U,PO_VENDOR_SITES_ALL PP
WHERE PV.TERMS_ID = AA.TERM_ID
---AND PV.LAST_UPDATE_DATE > TO_DATE('01-APR-07')
AND PP.VENDOR_ID = PV.VENDOR_ID
AND PV.LAST_UPDATED_BY = U.USER_ID
AND PP.PAY_SITE_FLAG = 'Y'
AND PP.ROWID =:ROWID

Thanks

Posted: Wed Apr 04, 2007 2:54 pm
by ramkic
Hi,
One way you can achieve this by having an update trigger on Payment Terms on po_vendor_sites_all table and call utl_smtp protocol to send email notifications to responsible persons.
Regards
ramkic

Posted: Wed Apr 04, 2007 11:32 pm
by sgeeta
we are on 11.5.7 and database 8.1.0 thx
[quote]Hi,
One way you can achieve this by having an update trigger on Payment Terms on po_vendor_sites_all table and call utl_smtp protocol to send email notifications to responsible persons.
Regards
ramkic

<i><div align="right">Originally posted by ramkic

Posted: Thu Apr 05, 2007 10:56 pm
by sgeeta
Hi Ramkic

do you have any sample code to do that we are on 8.0.1 does that have smtp mail please advice

Posted: Sat Apr 07, 2007 4:41 pm
by ramkic
Hi,
I will be working on the script. Can you please send me your email id, so that I can send it. Once you have tested that, we can request "Admin" to upload the same for future use.
Thanks
ramkic

Posted: Sat Apr 07, 2007 8:18 pm
by sgeeta
Thanks so much ramkic its sgeeta21@gmail.com
[quote]Hi,
I will be working on the script. Can you please send me your email id, so that I can send it. Once you have tested that, we can request "Admin" to upload the same for future use.
Thanks
ramkic

<i><div align="right">Originally posted by ramkic