嗯,用配置表的这个可行。在过程开头做判断,去取时候如取到就向下面执行,如取不到数据会转为异常处理块。而异常处理的时候在 when no_Data_found then 如何写才能把程序直接引到END过程。
我做的时候是: select count(*) into 一个变量 from 配置表 where 系统时间戳在时间段内 and 配置是本存储过程if count(*)的变量>0 then--有符合本存储过程的记录,才继续走,否则直接到了proc最后。 继续...... end if; exception when others then --这里catch if里面的未处理异常 .... end proc;
可以参考此贴
http://topic.csdn.net/u/20091216/09/bbde1c7d-6456-42f8-bfb1-2b877672e36b.html
select count(*) into 一个变量 from 配置表 where 系统时间戳在时间段内 and 配置是本存储过程if count(*)的变量>0 then--有符合本存储过程的记录,才继续走,否则直接到了proc最后。
继续......
end if;
exception when others then --这里catch if里面的未处理异常
....
end proc;
使用SCHEDULE job 可以解决问题,job的升级版!Oracle 10g加进来的!
很好用的!