2009/10/26

取得某個 Mail Address 所在的 Oracle ERP Alert

在 Oracle ERP Alert 中,

若想要知道在哪些 Alert 中,

有設定要發送給某個 Mail Address,

可以參考下面的語法 :
 語法
SELECT AA.ALERT_NAME
, AA.DESCRIPTION
, AAA.ACTION_ID
, AAA.NAME ACTION_NAME
, AAA.SUBJECT
, AAA.TO_RECIPIENTS
, AAA.CC_RECIPIENTS
, AAA.BCC_RECIPIENTS
FROM ALR_ACTIONS AAA
, ALR_ALERTS AA
WHERE 1 = 1
AND AA.APPLICATION_ID = AAA.APPLICATION_ID
AND AA.ALERT_ID = AAA.ALERT_ID
AND ( UPPER( AAA.TO_RECIPIENTS) LIKE UPPER('%&Mail_Address%')
or UPPER( AAA.CC_RECIPIENTS) LIKE UPPER('%&Mail_Address%')
or UPPER( AAA.BCC_RECIPIENTS) LIKE UPPER('%&Mail_Address%') );