您的位置:首页 > 博客中心 > 数据库 >

[oracle] 递归追溯完整部门名称 函数

时间:2022-03-14 01:58

 

create or replace function fn_DeptWholeName2(objectid in number)
return nvarchar2 is
wholename nvarchar2(500);

begin
select to_char(replace(wm_concat(OBJNAME),‘,‘,‘.‘))a into wholename from (
select * from v_organddept2 o
start with o.objid=objectid
connect by prior o.ParentID=o.OBJID
order by o.levelid )a;

return wholename;
end fn_DeptWholeName2;

热门排行

今日推荐

热门手游