zoukankan      html  css  js  c++  java
  • Oracle中case的第二种用法

      procedure P_GetProVerSingInfo_2018(varFileID in varchar2,
                                         p_cr1     out refcontent,
                                         p_cr2     out refcontent,
                                         p_cr3     out refcontent) as
      begin
      
        open p_cr1 for
          select *
            from ly_familyinformation
           where file_id = varFileID
             and iszfbtperson = '0'
           order by case
                      when relation = '购房人/申请人' then
                       0
                      when relation = '配偶' then
                       1
                      else
                       2
                    end,
                    applyer;
        open p_cr2 for
        /*
                             财产类型:1:公积金;2:社保;3:企业所得税缴纳情况;
                             4:工商登记情况;5:个人所得税缴纳情况;6:非居住类房屋情况;
                             7:机动车辆登记情况;8:其他财产
                        */
          select case t.propertype
                   when '1' then
                    '公积金'
                   when '2' then
                    '社保'
                   when '3' then
                    '企业所得税'
                   when '4' then
                    '工商登记'
                   when '5' then
                    '个人所得税'
                   when '6' then
                    '非居住类房屋'
                   when '7' then
                    '机动车辆登记'
                   when '8' then
                    '其他财产'
                 end propertype,
                 t.propertype as rn,
                 t.applyer,
                 F_ReturnDescription(t.id) DESCRIPTION,
                 t.rdjz
            from LY_FAMILYPROPERTY t
           where file_id = varFileID        
           order by rn;
        open p_cr3 for
          select * from ly_s_docbase where file_id = varFileID;
      
     
      end P_GetProVerSingInfo_2018;
  • 相关阅读:
    c traps and pitfalls reading note(1)
    比较好的进程篇总结(转)
    shell学习日志
    IPC--消息队列
    c进程学习日志
    c--socket通信TCP篇
    c语言文件操作总结
    c的面向对象思想记录
    c指针学习小结(参考别人总结的经验)
    vi 学习记录
  • 原文地址:https://www.cnblogs.com/wangjp-1233/p/10548954.html
Copyright © 2011-2022 走看看