zoukankan      html  css  js  c++  java
  • Oracle wm_concat()函数的实际运用

    作用:把一个数据表中多条记录的指定数据列值,以逗号(,)间隔形式返回。

    select decode(V_VALUE_TYPE,'01',wm_concat(order_code),
                                                            '02',wm_concat(to_char(order_date,'yyyy-mm-dd')),
                                                            '03',wm_concat(trim(remark))
                                              )
                                              into ls_return_string              
                                from (
                                       select order_code,factory_code,order_type,order_date,trunc(order_date,'month') order_date_month,remark
                                       from sts_env_report_infor
                                       where  FACTORY_CODE = V_FACTORY_CODE
                                              and
                                              ORDER_TYPE   = V_FLAG
                                              and
                                              trunc(ORDER_DATE,'month')= decode(ln_row,1,V_REPORT_DATE,ldt_max_date)                           
                                     )
                                group by factory_code,order_type,order_date_month;

  • 相关阅读:
    Swagger接入
    Elasticsearch5.0.1索引压测结果
    Elasticsearch5.0 BreakChange摘要
    Elasticsearch1.7到2.3升级实践总结
    Java动态代理全面分析
    Spring之AntPathMatcher
    Lock的实现之ReentrantLock详解
    Elasticsearch之client源码简要分析
    elasticserach 索引删除 源码分析
    httpClient4.5.2工具类总结
  • 原文地址:https://www.cnblogs.com/honliv/p/1987425.html
Copyright © 2011-2022 走看看