大批量修改fob数据

update fobupricdetail  t1
   set fobpriceusd2 = (select fobpriceusd2 from PUR_TEMP where cgicode = t1.cgicode and rownum = 1)
   where exists (select 1 from PUR_TEMP where cgicode = t1.cgicode) and t1.fobupricicode = '1000000000002373'

 

 

update fobupricdetail  t1 set usdbalance = fobpriceusd2 - fobpriceusd where fobupricicode = '1000000000003885'

 

 

 

 

 

 

update ccode t1 set (t1.pjcontact1,t1.pjphone1,t1.pjemail1,t1.pjcontact2,t1.pjphone2,t1.pjemail2)=
       (select t2.pjcontact1,t2.pjphone1,t2.pjemail1,t2.pjcontact2,t2.pjphone2,t2.pjemail2 from ccode_tmp t2
       where t1.ccode = t2.ccode) where exists (select 1 from ccode_tmp where ccode=t1.ccode)

 

 

多字段更新

update student A

  set (A.name,a.dq) =

  (select B.bname,b.bdq

  from newstudent B

  where B.Bid = A.id

  and A.dq = 10

  )

  where exists (select 1

  from newstudent B

  where B.Bid = A.id

  and A.


更新原来的数据

update fobupricdetail a set fobpriceusd2 = (select fobpriceusd2 from fobupricdetail b where fobupricicode='1000000000009903' and b.cgicode=a.cgicode) 
where exists (select 1 
from fobupricdetail b 
where b.cgicode=a.cgicode 
)  and cgicode in (
select cgicode from fobupricdetail where fobupricicode='1000000000009903'
) and destccode = 'NA' and fobupricicode!='1000000000009903'
and orderclass = 'PT'
and status = '80' 

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值