CONNECT BY ¿¡ ÀÇÇÑ Äõ¸®¹®
ÀÛ¼ºÀÚ °ü¸®ÀÚ ÀÛ¼º½Ã°£ 2009-03-21 16:05:41
 

SELECT  MAX(SYS_CONNECT_BY_PATH (bbsid, '^')) as bbb
        FROM (SELECT   
                    (select depth from tb_bi_tree where bbsid='board200') as uuu,bbsid, ROWNUM rn
                    FROM tb_bi_tree
              START WITH bbsid = 'board200'
              CONNECT BY PRIOR upper_bbsid=bbsid
              )
  START WITH rn = uuu - 2
  CONNECT BY rn = PRIOR rn - 1 ;


=======================================


BBB
----------------------------
^board151^board197^board200


¸ñ·Ï | ÀÔ·Â | ¼öÁ¤ | ´äº¯ | »èÁ¦