【发布时间】:2019-11-22 09:38:24
【问题描述】:
上下文: 我正在比较 2 个变量并在电子邮件正文中生成带有变量值的电子邮件
------------代码------------------
--Variable 1
select sum(sales)
into V1_sales
from sales
--variable 2
selsct sum(sales)
into v2_sales
from yesretday_sales
if v2_sales > V1_sales
then
EMAIL_ALERT
(p_mail_host => 'mailhost.abc.com',
p_from => 'sender.abc.com',
p_to => 'rec.abc.com',
p_subject => 'Sales of yesterday is greater than today'
p_message => 'Message: Today's sales which is'@v1_sales 'is lesser than yesretday's sales which is @v2_sales'
endif
Explanation:
Trying to compare 2 variables and include the variable in the email body, I'm using UTL_MAIL in orcale SQL
【问题讨论】:
标签: sql oracle oracle-sqldeveloper plsqldeveloper