with cte as( select bianma,fjbm from #tree where chkDisabled='true' union all select t.bianma,t.fjbm from cte c inner join #tree t on c.fjbm=t.bianma ) select * from cte;
with cte as( select bianma,fjbm from #tree where chkDisabled='true' union all select t.bianma,t.fjbm from cte c inner join #tree t on c.fjbm=t.bianma ) select * from cte;