Oracle -- 连接每行的内容

select wm_concat(message) from (
        select rownum no, 'Case ''' || code || '''' || '' || chr(10)
        || 'as_mean = "' || Trim(mean) || '"' || chr(10)
        || 'as_class = "' || Trim(class) || '"' || chr(10)
        || 'as_reason = "' || Trim(reason) || '"' || chr(10)
        || 'as_tip = "' || Trim(tips) || '"' || chr(10)  as message
        from t_bankpos_error
        ) where no >= 61 and no <= 65

posted @ 2017-05-03 11:04  liDB  阅读(342)  评论(0编辑  收藏  举报