使用to_char可以解决
select '100001' value ,'无效订单' name from dual union all select '200001' value ,'一证多户' name from dual union all select ( select to_char(wmsys.wm_concat(sys_error_code)) from es_sys_error_desc t where t.sys_error_code not in ('100001','200001') ) value , '异常订单' name from dual
wmsys.wm_concat函数是将同一列的多行拼接成一个行,并用逗号隔开,如果想用其他符号,使用replace即可
to_char目的是数据类型转换,使用它能与上面的记录union all
Leave a Reply