procedure xlxj_get_xsry
(xjrwbh varchar,
xsry   out varchar)
is
rymc varchar(30);
crow number;cursor  xsry_cur is
 select a.rymc from xlxjt_xsry,xlxjv_ryxx a
              where xlxjt_xsry.xjrwbh=xjrwbh and xlxjt_xsry.xjrybh=a.rybh;
  --查询任务编号下巡检人员
begin  xsry:='';   open xsry_cur ; loop
fetch xsry_cur into  rymc;
exit when xsry_cur %notfound;       begin
         xsry:=xsry||rymc||' ';
       end;
   end loop;
     close xsry_cur ;
    commit;end;