Advertisement

oracle多条数据整合为一条

阅读量:

1、wmsys.wm_concat(字段名)

复制代码
 select wmsys.wm_concat(customer_name)

    
 from A 
    
 where application_no='BF-A170418000'
    
    
    
    

注意:
A——字段名 必须为字符类型,若不符合该要求,应采用to_char函数进行转换

例如:

复制代码
 select wmsys.wm_concat(to_char((customer_name)))

    
 from A 
    
 where application_no='BF-A170418000'
    
    
    
    

B——若需使用其他分隔符进行分割,可采用replace方法
例如:

复制代码
 se

全部评论 (0)

还没有任何评论哟~