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;

 

转载于:https://www.cnblogs.com/wangjp-1233/p/10548972.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值