二维数据表表达式语句

decode、nvl函数


code row col_1 col_2 col_3 col_4......


k_4_1=x_1_4/(x_1_4+y_1_3*1.1)*z_4_1;


update k set k.col_1=(
select (temp.x2*1.1/decode((temp.x1+temp.x2*1.1),0,1,(temp.x1+temp.x2*1.1)))*z.col_1
from (
  select nvl(a1.xxdm,a2.xxdm) xxdm ,nvl(a1.x1,0) x1 ,nvl(a2.x1,0) x2 
  from 
  ( select code,col_4 x1 from x where x.row=1 ) a1
  full outer join 
   (select code,col_3 x1 from y where y.row=1 ) a2 
  on a1.code=a2.code) temp
  
  left join z  on temp.code=z.code and z.row=4 
  where temp.code =k.code
  ) where k.row=4 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值