with temp as(
select 'China' nation ,'Guangzhou' city from dual union all
select 'China' nation ,'Shanghai' city from dual union all
select 'China' nation ,'Beijing' city from dual union all
select 'USA' nation ,'New York' city from dual union all
select 'USA' nation ,'Bostom' city from dual union all
select 'Japan' nation ,'Tokyo' city from dual 
)
select nation,listagg(city,',') within GROUP (order by city)
from temp
group by nation
select goodsid,listagg(ss.StorageNo,',')  within group (order by ss.StorageNo) StorageNo
      from StorageGoods ssg
      left join storage ss on ssg.storageid=ss.guid
      group by goodsid
select goodsid,wmsys.wm_concat(ss.StorageNo) StorageNo
      from StorageGoods ssg
      left join storage ss on ssg.storageid=ss.guid
      --where ssg.goodsid=sd.goodsid
      group by goodsid

 另参考:http://dacoolbaby.iteye.com/blog/1698957

相关文章:

  • 2021-08-03
  • 2021-08-06
  • 2022-12-23
  • 2022-01-05
  • 2021-10-07
  • 2022-12-23
  • 2021-05-07
猜你喜欢
  • 2021-12-23
  • 2021-05-27
  • 2021-07-13
  • 2022-12-23
  • 2022-12-23
  • 2022-01-12
  • 2021-08-18
相关资源
相似解决方案