免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1388 | 回复: 1
打印 上一主题 下一主题

盲人再次求救! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-12-28 16:07 |只看该作者 |倒序浏览
我是个orcale盲,工作需求,要看懂下列语句,请高手们能给盲人做点注释,在这谢谢大家了。

create or replace procedure addnewbbscolumn
is
vpath varchar2(2000);
begin      
     for cur in (
         select forumid+22000 columnno, decode(forumfatherid, 0, 21001, -1, 21001, forumfatherid+22000) fatherno, forumnamec, forumnamee
         from bbsforum@ora47link where not exists(select 1 from hoyodocolumn where columnno = 22000+forumid)
         and forumid > 0
         order by forumid
         ) loop
         begin      
         insert into hoyodocolumn(columnno,fatherno,columnname,columnenglishname)
         values(cur.columnno,cur.fatherno,cur.forumnamec,cur.forumnamee);
         vpath := showalluppath(cur.columnno);
         insert into columninfopath(columnno,fatherno,path)
         values(cur.columnno,cur.fatherno,vpath);
         exception
                  when others then
                       null;
         end;
  end loop;
end;
create or replace procedure getcolumnpath_test
is
        vpath varchar2(200);
        vnum number:=0;
begin
        for cur in (select columnno, fatherno from column_countpath
              where columnno < 1000000 or columnno > 2000000
                    --or columnno in (1000291,1000290,1000000)
              order by columnno) loop
        begin
                vpath := showalluppath_test(cur.columnno);

                --myhard index 360287970189639680 -5
                if (cur.columnno = 360287970189639680) then
                        vpath := replace(vpath, '360287970189639680', '360287970189639680,-5');
                end if;
insert into count.cidpath_test
                values(cur.columnno, cur.fatherno, vpath);
                vnum := vnum + 1;
                if (vnum >= 100) then
                        vnum := 0;
                        commit;
                end if;
        exception
                when others then
                        null;
        end;
        end loop;
  begin
        insert into count.cidpath_test values(-2, -2, '-2');
        commit;
  exception
                when others then
                        null;
  end;
end;



大家辛苦了,请帮忙。

[ 本帖最后由 snowbaby 于 2006-12-28 17:12 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2006-12-28 17:12 |只看该作者
a. sql%rowcount是指上一个DML语句影响的行数;
b.如果程序有其它问题,则返回一个NULL值.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP