with recursive menu_tree (mnu_id, mnu_name, prt_id, mnu_level) as
(
select
mnu_id,
substring(mnu_name,0,60) as mnu_name,
prt_id,
1 as mnu_level
from appd_menu
where mnu_id = 1
union all
select
m.mnu_id,
t.mnu_name||'-->'||m.mnu_name,
m.prt_id,
t.mnu_level + 1
from appd_menu m, menu_tree t
where t.mnu_id = m.prt_id
)
select
mnu_name,
split_part(mnu_name,'-->', 1) node1,
split_part(mnu_name,'-->', 2) node2,
split_part(mnu_name,'-->', 3) node3,
split_part(mnu_name,'-->', 4) node4,
split_part(mnu_name,'-->', 5) node5,
split_part(mnu_name,'-->', 6) node6,
split_part(mnu_name,'-->', 7) node7,
split_part(mnu_name,'-->', 8) node8,
mnu_level
from menu_tree order by mnu_name
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)