wm_concat函数在同样的10g下执行结果不同:
with a as(
select 1 id,'aa' name from dual union all
select 1 id,'bb' name from dual union all
select 2 id,'cc' name from dual union all
select 2 id,'dd' name from dual)
select id,wm_concat(name) name
from a
group by id;
----
ID
NAME
1
1,1
2
2,2
select * from v$version
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE
10.2.0.4.0
Production
TNS for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Productio
NLSRTL Version 10.2.0.4.0 - Production
----------------------------------
with a as(
select 1 id,'aa' name from dual union all
select 1 id,'bb' name from dual union all
select 2 id,'cc' name from dual union all
select 2 id,'dd' name from dual)
select id,wm_concat(name) name
from a
group by id;
----
ID
NAME
1
2
select * from v$version
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
PL/SQL Release 10.2.0.5.0 - Production
CORE
10.2.0.5.0
Production
TNS for IBM/AIX RISC System/6000: Version 10.2.0.5.0 - Productio
NLSRTL Version 10.2.0.5.0 - Production |