• 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;
  • 相关阅读:
    前端主页
    配置站点
    前台
    数据库配置
    后台:Django项目创建
    虚拟环境的搭建
    pip安装源
    AngularJS Scope(作用域)
    scala中的匿名函数 ==> 简单示例
    scala中的内部类 ==> 简单示例
  • 原文地址:https://www.cnblogs.com/wangjp-1233/p/10548954.html
Copyright © 2020-2023  润新知