您好,登錄后才能下訂單哦!
--查自身結(jié)轉(zhuǎn)數(shù)量是否不正確
select shqjzhshl,cwjcsl+cksl-bqrsh,bqrsh-cksl, from ymjzhk where spid='SPH00000562' order by jzhh desc
--檢查結(jié)轉(zhuǎn)庫(kù)與流水庫(kù)結(jié)轉(zhuǎn)數(shù)據(jù)是否一致
select jzhh,sum(rkshl),sum(chkshl),sum(rkshl)-sum(chkshl) From splsk where spid='SPH00000562' group by jzhh order by jzhh desc
--對(duì)比發(fā)現(xiàn)JZH00000040結(jié)轉(zhuǎn)庫(kù)cksl多出了90
--備份要更新數(shù)據(jù)
select into fr_ymjzhk20190102_SPH00000562 from ymjzhk where spid='SPH00000562' and nian='2018' order by jzhh desc
--更新數(shù)據(jù)
update ymjzhk set cksl=1616-90,bqxsshl=1616-90,bqysh=bqysh+90,cwjcsl=cwjcsl+90 where spid='SPH00000562' and jzhh='JZH00000040'
update ymjzhk set shqjzhshl=shqjzhshl+90,bqysh=bqysh+90,cwjcsl=cwjcsl+90 where spid='SPH00000562' and jzhh='JZH00000041'
update ymjzhk set shqjzhshl=shqjzhshl+90,bqysh=bqysh+90,cwjcsl=cwjcsl+90 where spid='SPH00000562' and jzhh='JZH00000042'
update ymjzhk set shqjzhshl=shqjzhshl+90,bqysh=bqysh+90,cwjcsl=cwjcsl+90 where spid='SPH00000562' and jzhh='JZH00000043'
update ymjzhk set shqjzhshl=shqjzhshl+90,bqysh=bqysh+90,cwjcsl=cwjcsl+90 where spid='SPH00000562' and jzhh='JZH00000044'
update ymjzhk set shqjzhshl=shqjzhshl+90,bqysh=bqysh+90,cwjcsl=cwjcsl+90 where spid='SPH00000562' and jzhh='JZH00000045'
update ymjzhk set shqjzhshl=shqjzhshl+90,bqysh=bqysh+90,cwjcsl=cwjcsl+90 where spid='SPH00000562' and jzhh='JZH00000046'
update ymjzhk set shqjzhshl=shqjzhshl+90,bqysh=bqysh+90,cwjcsl=cwjcsl+90 where spid='SPH00000562' and jzhh='JZH00000047'
--更新結(jié)轉(zhuǎn)數(shù)量(容易遺忘)
update spkfjc set shqjzhshl=230+90 where spid='SPH00000562'
update hwsp set jzshl=230+90 where spid='SPH00000562' and hw='HWI00000025'
--檢查所有結(jié)轉(zhuǎn)數(shù)量是否正確
select * from spkfjc where cwsqjzsl<>kcshl
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。