前两天写了这样一个东西,把一张把ciid为0的数据从另一张表找到imsi相同的时间相近的ciid添加进去,结果写到select的时候发现了这样一个问题,就是select要查不到数据的时候会自动报错,也就终止了循环,以下是改过后的代码,想请教下,如果select不到东西的时候我怎么跳到下一个select,if还是没数据的时候我直接continue到下一次循环?
create or replace procedure Proc_update_paging_ciid
(
setstarttime in date,
setendtime in date
)
as
begin
declare
cursor LCID_cursor is select lacid, ciid,starttime,imsi from t_detail_cs_paging
where starttime>=setstarttime
and starttime<setendtime
and ciid = 0 order by starttime desc;
lac_ci_id_cursor LCID_cursor%rowtype;
v_ciid t_detail_cs_pagingmo.ciid%type;
v_ciid1 t_detail_cs_pagingmo.ciid%type;
v_ciid2 t_detail_cs_pagingmo.ciid%type;
v_pagingmotime date;
v_pagingtime date;
v_number number(10);
begin
open LCID_cursor;
loop
begin