日期:2014-05-17 浏览次数:21119 次
declare
l_name varchar2(100);
begin
select ename into l_name from emp where empno = 10;
dbms_output.put_line(l_name);
exception
when NO_DATA_FOUND then
dbms_output.put_line('not found');
end;
procedure pro_service_statistics is
v_sql varchar2(1000);
v_obj varchar2(500);
v_num number;
v_date date;
--v_error varchar2(1000);
v_state number;
v_detail varchar(1000);
v_id number;
v_ename varchar2(500);
v_cname varchar2(1000);
v_flag number;
cursor cur_cursor is
select p.config_code, p.config_name from t_custom_table p;
cursor cur_Fcursor is
select t.service_id, t.english_name, t.chinese_name
from t_service_statistics t
where t.garther_date >= trunc(sysdate)
and t.flag = 0;
begin
--如果当天有没有成功的数据
if cur_Fcursor%notfound then --这里就报错了
for fitem in cur_Fcursor loop
pro_get_statistics(fitem.english_name, v_sql);
--做更新操作
v_id := fitem.service_id;
v_ename := fitem.english_name;
v_cname := fitem.chinese_name;
v_state := 1;
-- v_flag
end loop;
else
for titem in cur_cursor loop