【Vegas原创】对应父节点的树状返回查询
例:
将此改为树状返回值:
select rtstpre,rtstname
from proute
where rtid='ROU00371'
from proute
where rtid='ROU00371'
| RTSTPRE | RTSTNAME |
| PE | Packing |
| START | FI |
| FI | Glue |
| Glue | PE |
将此改为树状返回值:
select sys_connect_by_path(rtstname,'-') path
from (
select rtstpre,rtstname
from proute
where rtid='ROU00371'
)
start with rtstpre='START'
connect by prior rtstname=rtstpre
from (
select rtstpre,rtstname
from proute
where rtid='ROU00371'
)
start with rtstpre='START'
connect by prior rtstname=rtstpre
| PATH |
| -FI |
| -FI-Glue |
| -FI-Glue-PE |
| -FI-Glue-PE-Packing |
喜欢请赞赏一下啦^_^赞赏后请加wx:weyocul,相关文章提到的的安装包稍后给到哦!没有收到赞赏直接加我的,直接无视哈!

浙公网安备 33010602011771号