Oracle ORA-06502 ORA-06512

问题描述:

Oracle ORA-06502 ORA-06512_第1张图片

发现存储过程里有对oracle 类型的操作

sql_text := 'select a.* from t_Drivewaystatus a inner join t_intersection b on a.intersectioncode = b.intersectioncode where b.used = 1 order by a.intersectioncode,a.drivewaycode';

  open cur for sql_text;

  fetch cur bulk collect

    into status_list;

  close cur;

for i in status_list.first .. status_list.last loop

  --如果status_list里没有记录的话,此过程会报错,需要判断一下status_list是否有值或捕捉这个错误

  可以先判断status_list的count值,在进行后续处理,就不会有此类问题出现了。

你可能感兴趣的:(Oracle ORA-06502 ORA-06512)