用到Oralce10g以后增加的函数wmsys.wm_concat 例如这张表的有两个字段,要按airport_id合并成两行可用sql语句 select airport_id, wmsys.wm_concat( account) from AIRPORT_MODIFY group by airport_id 结果为: 非常简单,美中不足的是合并结果没有排序,解决排序问题最简单的办法就是在合并列前加上distinct 此外,如果合并列结果出现乱码,需要在合并列前加上to_char(),如wm
select to_char(wm_concat(ssss)) from (select replace(C_CELL_CONTENT ,'=$','') ssss ,rownum ss from ( select distinct C_CELL_CONTENT,1 sss from T_F_RC_REP_TBCELL where C_CELL_CONTENT like '=$%"%')) splitstr和wm_concat()的用法 select distinct * from table(
windows forms 上一个类似于wpf snoop 的工具: Hawkeye 周银辉 WPF上有snoop这样的run time object editor让人用着很爽, 今天搜到了一个for windows forms的工具hawkeye 下载: http://hawkeye.codeplex.com/
本文转自:http://www.cnblogs.com/ycdx2001/p/3502495.html with temp as( select 'China' nation ,'Guangzhou' city from dual union all select 'China' nation ,'Shanghai' city from dual union all select 'China' nation ,'Beijing' city from dual union all select
原帖:http://www.cnblogs.com/nayitian/p/3231734.html wmsys.wm_concat Definition: The Oracle PL/SQL WM_CONCAT function is used to aggregate data from a number of rows into a single row, giving a list of data associated with a specific COMMENT_BODY. In ef
select t.rank, t.Name from t_menu_item t; 10 CLARK 10 KING 10 MILLER 20 ADAMS 20 FORD 20 JONES 20 SCOTT 20 SMITH 30 ALLEN 30 BLAKE 30 JAMES 30 MARTIN 30 TURNER 30 WARD --------------------------------我们通过 10g 所提
Sql代码 select t.rank, t.Name from t_menu_item t; 10 CLARK 10 KING 10 MILLER 20 ADAMS 20 FORD 20 JONES 20 SCOTT 20 SMITH 30 ALLEN 30 BLAKE 30 JAMES 30 MARTIN 30 TURNER 30 WARD -------------------------------- 我们通过