oracle <value error>,紧急求助,存储过程报告的错误Error: Hint: Value assigned to

create or replace procedure stat_user_mdiacli_active_num as

startTime  date;

endTime    date;

media_id   number(19);

media_name char(50);

active_num number(19);

filter_num number(19);

cursor media_cursor is

select id, media_name from media;

begin

starttime  := trunc(sysdate - 1, 'dd');

endtime    := trunc(sysdate - 1, 'dd') + 1;

filter_num := 1;

open media_cursor;

if filter_num <= 5 then

loop

fetch media_cursor

into media_id, media_name;

exit when media_cursor%notfound;

select *

into active_num

from (select count(*)

from (select count(*) num, lp.news_id

from log_para lp

where lp.add_date >= startTime

and lp.add_date <= endTime

and lp.media_id = media_id

and lp.url like '/client/%'

and lp.reader_id > 0

group by lp.reader_id) v

where v.num >= filter_num);

insert into user_type_mdiacli_active_num

values

(sysdate - 1, media_id, media_name, active_num, filter_num);

end loop;

filter_num := filter_num + 1;

end if;

close media_cursor;

EXCEPTION

WHEN OTHERS THEN

ROLLBACK;

RETURN;

END stat_user_mdiacli_active_num;

编译通过了,但报告下列错误

Compilation errors for PROCEDURE GO.STAT_USER_MDIACLI_ACTIVE_NUM

Error: Hint: Value assigned to 'filter_num' never used in 'stat_user_mdiacli_active_num'

Line: 36

Text: filter_num := filter_num + 1;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值