标签:where 需要 char 作用 ann wm_concat pre to_char 转变
函数wm_concat(列名),该函数可以把列值以","号分隔起来,并显示成一行;主要作用于行专列;
select a.subsidy_id, a.channel_id, b.channel_code, a.check_account, a.one_time_check_account, to_char(wm_concat(c.attach_id)) from mgmt_chl_subsidy a left join mgmt_chl_attach_file c on a.channel_id=c.channel_id left join mgmt_chl_base b on a.channel_id=b.channel_id where a.accept_state=1 group by a.subsidy_id,a.channel_id,b.channel_code,a.check_account,a.one_time_check_account
简单使用wm_concat可能会导致字段变为clob,此处需要使用 to_char()转变clob
标签:where 需要 char 作用 ann wm_concat pre to_char 转变
原文地址:http://www.cnblogs.com/zhangliwei/p/8016580.html