Oracle - 合并查询数据项

 

select c.channel, c.channel_name , s.show_type, s.show_type_name
  from T_CHANNEL_INFO c, T_SHOW_INFO s
 where c.head_seq_no = s.head_seq_no
 order by c.channel;

 

 

复制代码
select distinct c.channel,
                c.channel_name,
                TO_CHAR(REPLACE((wm_concat(s.show_type)
                                 over(PARTITION BY c.channel ORDER BY 1)), ',', ';')) AS show_type,
                TO_CHAR(REPLACE((wm_concat(s.show_type_name)
                                 over(PARTITION BY c.channel ORDER BY 1)), ',',  ';')) AS show_type_name
  from T_CHANNEL_INFO c, T_SHOW_INFO s
 where c.head_seq_no = s.head_seq_no
 order by c.channel;
复制代码

 

posted @   HelloWorld102  阅读(209)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示