一、Oracle多行字符串连接(合并)
select user_id,listagg(line_nm,’,’) within group (order by user_id)
from 表名 group by user_id;
例如:
select sfe01,listagg(sfe11,',') within group (order by sfe01)
From sfe_file
where sfe01='DK020-220600116'
group by sfe01
一、Oracle多行字符串连接(合并)
select user_id,listagg(line_nm,’,’) within group (order by user_id)
from 表名 group by user_id;
例如:
select sfe01,listagg(sfe11,',') within group (order by sfe01)
From sfe_file
where sfe01='DK020-220600116'
group by sfe01