zoukankan      html  css  js  c++  java
  • Oracle中table数据数据类型

    function F_ReturnDescription(varID in varchar2) return varchar2 is
      
        numDataCount number(12);
        mytable      ly_familyproperty%rowtype;
      begin
      
        select count(1)
          into numDataCount
          from ly_familyproperty t
         where t.id = varID;
        if numDataCount = 0 then
          return '';
        end if;
        select * into mytable from ly_familyproperty where id = varID;
        /*
        1:公积金;2:社保;3:企业所得税缴纳情况;4:工商登记情况;5:个人所得税缴纳情况;
        6:非居住类房屋情况;7:机动车辆登记情况;8:其他财产
        */
        if mytable.propertype = '1' then
          return '月缴存额:' || mytable.MONEY || '';
        elsif mytable.propertype = '2' then
          return '月缴存额:' || mytable.MONEY || '';
        elsif mytable.propertype = '3' then
          return '月缴纳基数:' || mytable.MONEY || '';
        elsif mytable.propertype = '4' then
          return '工商主体名称:' || mytable.BUSINESS_TITLE || ';' || '登记时间:' || to_char(mytable.CHECK_TIME,
                                                                                  'yyyy-mm-dd') || ';' || '出资额:' || mytable.MONEY || '万元';
        elsif mytable.propertype = '5' then
          return '月缴纳基数:' || mytable.MONEY || '';
        elsif mytable.propertype = '6' then
          return '房屋地址:' || mytable.ADDRESS || ';建筑面积:' || mytable.BUILDAREA || ';发证时间:' || to_char(mytable.CHECK_TIME,
                                                                                                    'yyyy-mm-dd') || ';产权证号:' || mytable.PRONUM;
        elsif mytable.propertype = '7' then
          return '品牌:' || mytable.brand || ';排量:' || mytable.EXHAUST_VOLUME || ';车辆使用性质:' || mytable.USE_NATURE || ';登记时间:' || to_char(mytable.CHECK_TIME,
                                                                                                                                       'yyyy-mm-dd');
        elsif mytable.propertype = '8' then
          return mytable.business_title;
        else
          return '';
        end if;
      
      end F_ReturnDescription;
  • 相关阅读:
    滑动窗口模板
    交换机命令
    针对织梦程序列表字段内可有可无的显示方法
    dedecms中常见问题修改方法
    redis系列之------字典
    1.InfluxDB-官方测试数据导入
    MYSQL第二课
    centos6.8下hadoop3.1.1完全分布式安装指南
    Mysql—添加用户并授权
    什么是全文检索
  • 原文地址:https://www.cnblogs.com/wangjp-1233/p/10548972.html
Copyright © 2011-2022 走看看