Created
July 2, 2015 01:18
-
-
Save yangkun/5e6385d20d896f07c2ab to your computer and use it in GitHub Desktop.
[oracle] 조인된 테이블의 멀티 값을 한 컬럼으로 붙이기
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION get_keywords(p_powerlink in TOUR_POWER_LINK_KEYS.TPLK_POWER_LINK%TYPE) | |
RETURN VARCHAR2 | |
IS | |
l_text VARCHAR2(32767) := NULL; | |
BEGIN | |
FOR cur_rec IN (SELECT TPLK_KEYWORD FROM TOUR_POWER_LINK_KEYS WHERE TPLK_POWER_LINK = p_powerlink order by tplk_seq asc) LOOP | |
l_text := l_text || ',' || cur_rec.TPLK_KEYWORD; | |
END LOOP; | |
RETURN LTRIM(l_text, ','); | |
END; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment