WITH T ( menu_cd , parent_cd , menu_nm , lvl ) AS ( SELECT 1, NULL, 'home', 1 FROM DUAL UNION ALL SELECT 2, 1, 'TV', 2 FROM DUAL UNION ALL SELECT 3, 1, 'PHONE', 2 FROM DUAL UNION ALL SELECT 4, 2, 'TV모델명1', 3 FROM DUAL UNION ALL SELECT 5, 2, 'TV모델명2', 3 FROM DUAL UNION ALL SELECT 6, 3, 'PHONE모델명1', 3 FROM DUAL UNION ALL SELECT 7, 3, 'PHONE모델명2', 3 FROM DUAL ) SELECT LISTAGG(MENU_NM,'>') WITHIN GROUP(ORDER BY level desc ) FROM T START WITH menu_cd = 4 CONNECT BY menu_cd = PRIOR parent_cd
강의에 있는 내용이네요.^^; 찾아보면 되는건데 급한거라 문의 올렸습니다.
답변해주신 마농님 새로운 방법도 알려주신 우리집아찌님 감사합니다.^^