2012年2月29日
摘要: SELECT COL1,LTRIM(MAX(SYS_CONNECT_BY_PATH(COL2,',')),',') COL2 FROM ( SELECT COL1,COL2,MIN(COL2) OVER(PARTITION BY COL1) COL2_MIN, (ROW_NUMBER() OVER(ORDER BY COL1,COL2))+(DENSE_RANK() OVER (ORDER BY COL1)) NUMID FROM T2 ) START WITH COL2=COL2_MIN CONNECT BY PRIOR NUMID= NUMID-1 GROU 阅读全文
posted @ 2012-02-29 17:30 易成波 阅读(1119) 评论(0) 推荐(0) 编辑