oracle合併角色於一單元格顯示

select   yh.yhid   , to_char(wmsys.wm_concat(js.jsmc))    from xtgl_yh yh 
left join  xtgl_yh_js  yhjs  on  yh.yhid =yhjs.yhid
left join  xtgl_js  js  on  js.jsid=yhjs.jsid
group by  yh. yhid )a
left join  xtgl_yh  yh on   yh.yhid = a.yhid 
 
 
to_char(wmsys.wm_concat(js.jsmc))
張三       系統管理員,經理
李四       經理
 
原來的是這樣的
張三       系統管理員
張三       經理
李四       經理
相關文章
相關標籤/搜索