Compilation errors for PROCEDURE BOSSWG.T_PRO_OVPERTIME_ALARM_MESSAGE
Error: PLS-00402: alias required in SELECT list of cursor to avoid duplicate column names
Line: 30
Text: for rec in (select *
Error: PL/SQL: Statement ignored
Line: 30
Text: for rec in (select *
create or replace procedure t_pro_ovpertime_Alarm_Message is
v_count number;
v_time number;BEGIN
--统计获取接收短信的员工
SELECT count(*)
into v_count
FROM staff_contact a
where a.mobile in
('18903612163', '13394503513', '18903613203', '18903612199');
--统计超市告警的工单
select count(*)
into v_time
from (select a.task_id, max(state_date) state_date
from gather.b_gather_log@bill a
group by a.task_id) x,
task_time_t y
where x.task_id = y.task_id
and (sysdate - x.state_date) * 1440 > y.task_time; if v_count > 0 then
for c in (select staff_id
from staff_contact
where mobile in ('18903612163',
'13394503513',
'18903613203',
'18903612199')) loop
if v_time > 0 then
for rec in (select *
from (select a.task_id, max(state_date) state_date
from gather.b_gather_log@bill a
group by a.task_id) x,
task_time_t y
where x.task_id = y.task_id
and (sysdate - x.state_date) * 1440 > y.task_time) loop
INSERT INTO notification_interface
(notification_interface_id,
generate_date,
recipient,
notify_flag,
notify_mode,
notify_count,
replay_date,
deadline,
notify_reply,
notify_content,
originator)
VALUES
(notification_interface_id_seq.nextval,
SYSDATE,
c.staff_id, --通知人的staffid
'0',
'3',
'1',
NULL,
SYSDATE + 1,
1,
'【采集任务名称】' || rec.task_name || '未及时采集,请及时处理,最后一次采集时间:' ||
rec.state_date || ',采集频率阀值:' || rec.task_time || '分钟', --修改短信内容
NULL);
end loop;
end if;
end loop;
end if;
end t_pro_ovpertime_Alarm_Message;
Error: PLS-00402: alias required in SELECT list of cursor to avoid duplicate column names
Line: 30
Text: for rec in (select *
Error: PL/SQL: Statement ignored
Line: 30
Text: for rec in (select *
create or replace procedure t_pro_ovpertime_Alarm_Message is
v_count number;
v_time number;BEGIN
--统计获取接收短信的员工
SELECT count(*)
into v_count
FROM staff_contact a
where a.mobile in
('18903612163', '13394503513', '18903613203', '18903612199');
--统计超市告警的工单
select count(*)
into v_time
from (select a.task_id, max(state_date) state_date
from gather.b_gather_log@bill a
group by a.task_id) x,
task_time_t y
where x.task_id = y.task_id
and (sysdate - x.state_date) * 1440 > y.task_time; if v_count > 0 then
for c in (select staff_id
from staff_contact
where mobile in ('18903612163',
'13394503513',
'18903613203',
'18903612199')) loop
if v_time > 0 then
for rec in (select *
from (select a.task_id, max(state_date) state_date
from gather.b_gather_log@bill a
group by a.task_id) x,
task_time_t y
where x.task_id = y.task_id
and (sysdate - x.state_date) * 1440 > y.task_time) loop
INSERT INTO notification_interface
(notification_interface_id,
generate_date,
recipient,
notify_flag,
notify_mode,
notify_count,
replay_date,
deadline,
notify_reply,
notify_content,
originator)
VALUES
(notification_interface_id_seq.nextval,
SYSDATE,
c.staff_id, --通知人的staffid
'0',
'3',
'1',
NULL,
SYSDATE + 1,
1,
'【采集任务名称】' || rec.task_name || '未及时采集,请及时处理,最后一次采集时间:' ||
rec.state_date || ',采集频率阀值:' || rec.task_time || '分钟', --修改短信内容
NULL);
end loop;
end if;
end loop;
end if;
end t_pro_ovpertime_Alarm_Message;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货