- 论坛徽章:
- 0
|
我是个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 编辑 ] |
|