1.sys_connect_by_path方式
select nvl(max(sys_connect_by_path(c_fundcode, ',')), '******')
from (select rownum rnum, c_fundcode from tfundinfo)
start with rnum = 2
connect by rnum -1 = prior rnum;
输出NVL(MAX(SYS_CONNECT_BY_PATH(C_ ,251001,57DQ10,57DQ20,57DQ30,57DQ40,57DQ50,57DQ60,57DQ70
2.plsql方式
DECLARE
V_CHILDCODE varchar2(128) := '######';
BEGIN
FOR t IN (SELECT C_FUNDCODE
FROM tfundinfo)
LOOP
V_CHILDCODE := V_CHILDCODE||','||t.c_fundcode;
END LOOP;
:sChildCode := V_CHILDCODE;
END;
阅读(1434) | 评论(0) | 转发(0) |