今天看到存储过程里有Boss写的一段处理逻辑,也算是与之前几篇笔记类似的功能,记录一下,说不定以后会用到
for r_i in 1..100 loop
r_Start:=Instrb(r_BL_ORDER_NOS,',');
if r_Start=0 then
r_BL_ORDER_NO:=r_BL_ORDER_NOS;
else
r_BL_ORDER_NO:=substrb(r_BL_ORDER_NOS,1,r_Start-1);
r_BL_ORDER_NOs:=substrb(r_BL_ORDER_NOS,r_Start+1,8000);
end if;
r_BL_ORDER_NO:=substrb(r_BL_ORDER_NO,2,40) ;
r_BL_ORDER_NO:=substrb(r_BL_ORDER_NO,1,length(r_BL_ORDER_NO)-1) ;
if r_Start=0 then
exit;
end if;
end loop;