update
bs_storage
setstoreqty
=storeqty
-a.mqty
from
( select
nb_disbill.companyid,goodsid,nb_disbill.outstoreid,outstorepos,mqty,
nb_disbill.billno
from
nb_disbill
inner
join
nb_disbilldetail
onnb_disbill.companyid
=nb_disbilldetail.companyid
andnb_disbill.billno
=nb_disbilldetail.billno
) asa
where
a.companyid
=bs_storage.companyid
anda.goodsid
=bs_storage.goodsid
anda.outstoreid
=bs_storage.storeid
anda.outstorepos
=bs_storage.storepos
anda.billno ='
db0706200024
'and
a.companyid ='
002'
oracle批量更新資料
目的 兩個表t1,t2,t1裡面的字段,id,name,t2也是,將t2表和t1表裡面相等的id的記錄的name欄位更新到t1表裡面 1 update t1 set name select t2.name from t2 where t2.id t1.id where exits select 1 ...
Hibernate 批量更新資料
進行批量更新時,如果一下子把所有物件載入到session的快取中,然後再進快取中一一更新它們,顯然是不可取的,為了解決這一問題,可以使用滾動的結果集 org.hibernate.scrollableresults,query的 scroll 方法返回乙個scrollableresults物件。以下是...
jdbc批量更新資料
有些時候,適合用jdbc。比如讀乙個大的excel檔案資料到資料庫 public static listwelfareimport multipartfile file,string id,string businesstype,iwelfaredao welfaredao throws ioexc...