我有一个存储过程,test正常,可以插入数据,然后建了job定时执行,可是第二天我看,job的日志显示执行成功,数据却没有插入到指定的表
各位能帮看下吗?
存储过程----->:
create or replace procedure pro_mis_linked_daily_all
is
begin
INSERT INTO mis_linked_daily_all
select b.area,
b.code,
b.name,
decode(b.yt, 'S', '超市', '百货'),
nvl(sum(case
when a.fkfs = 3 then
a.fkje
end),
0) red_fk,
nvl(sum(case
when a.fkfs = 3 then
a.jyje
end),
0) red_jy,
nvl(sum(case
when a.fkfs = 2 then
a.fkje
end),
0) cpn_fk,
nvl(sum(case
when a.fkfs = 2 then
a.jyje
end),
0) cpn_jy,
nvl(sum(case
when a.fkfs = 1 then
a.fkje
end),
0) odr_fk,
nvl(sum(case
when a.fkfs = 1 then
a.jyje
end),
0) odr_jy,
nvl(sum(a.fkje), 0) all_fk,
nvl(sum(a.jyje), 0) all_jy,
c.st_sum,
a.statistics
from mis_linked_ld a
inner join mis_store b
on a.storecode = b.code
and a.statistics = trunc(sysdate) - 1
inner join mis_members c
on c.code = a.storecode
and a.statistics = c.statistics
group by b.area, b.code, b.name, b.yt, c.st_sum, a.statistics;
commit;
end;
job------->
begin
sys.dbms_scheduler.create_job(job_name => 'REPORT.JOB_MIS_LINKED_DAILY_ALL',
job_type => 'STORED_PROCEDURE',
job_action => 'PRO_MIS_LINKED_DAILY_ALL',
start_date => to_date('10-09-2015 03:00:00', 'dd-mm-yyyy hh24:mi:ss'),
repeat_interval => 'Freq=Daily;Interval=1',
end_date => to_date(null),
job_class => 'DEFAULT_JOB_CLASS',
enabled => true,
auto_drop => false,
comments => '');
end;
/
|
|