码迷,mamicode.com
首页 > 其他好文 > 详细

查找引发 ORA-01436: 用户数据中的 CONNECT BY 循环 错误的数据

时间:2018-08-27 21:44:10      阅读:1175      评论:0      收藏:0      [点我收藏+]

标签:机构   class   bms   gid   continue   top   错误   错误信息   number   

 

    declare
            cursor orList is select  *  from t_org;
            topOrgID number;
    begin 
         for org in orgList loop
             begin 
                  select t.ORG_ID into topOrgID  from t_ORG t  where t.UP_ORG_ID = 0
                  start with t.ORG_ID = org.ORG_ID connect by prior t.UP_ORG_ID = t.ORG_ID
                  exception
                      when others then 
                            if SQLCODE = -1436 then   
                                dbms_out_put.put_line(‘错误信息:‘||SQLERRM || ‘;错误代码:‘||SQLCODE || ‘;错误机构:‘|| org.ORG_ID);
                            end if;
                          continue;
                   end;
          end loop;
     end;            

查找引发 ORA-01436: 用户数据中的 CONNECT BY 循环 错误的数据

标签:机构   class   bms   gid   continue   top   错误   错误信息   number   

原文地址:https://www.cnblogs.com/doubleo2water/p/9544168.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!