記帳資料只記部分後如何處理

2021-09-20 15:48:37 字數 2762 閱讀 9149

查詢記賬中間表中是否有資料

select *  from int_wms_xsck_bill where djbh not in(select djbh from jzorder_hz)

如果有將其單據編號插入表#a

檢查明細資料並插入兩張表

insert into jzorder_mx(djbh, dj_sn,  dj_sort, spid, dw, jlgg, pihao, baozhiqi, sxrq, baozhshl, lingsshl, hw, shl, dj, hshj, koul, je, shlv, she, hsje, lshj, zengp, wlqrshl, wlqxsl, wlqrjg, wlqrje, wlqrshe, wlqrhsje, is_wlzx, kfqrshl, kfqxsl, is_kfzx, is_zx, is_gsp, isjs, istk, yiwchsl, canssl, quxsl, yiwchje, yiwchsje, pici, ******h, bukccb, nhshj, yhshj, jiansh, buckcb, is_hs, chbdj, yhsshl, yhesje, xgdjbh, recnum, ys_sn, ydj, ndj, weixsl, yixsl, duiydjbh, duiydj_cn, lshje, phyqlx, miejph, beizhu, is_jush, koulv, koulv1, koulv2, koulv3, dj2, je2, koulv4, thyy, zy_dy, qdchbdj, zdshj, jwh, dwbhh, jsshl, pckhdj, hsjj, ml2, hwshl, chbdj2, xsbmxz, jywdd, lhfukfs, pcxsxj, isdstj, mjpihao)

select distinct a.djbh, dj_sn,   dj_sort, a.spid, dw, jlgg, a.pihao, a.baozhiqi, a.sxrq, baozhshl, lingsshl, a.hw, a.shl, dj, a.hshj, koul, je, shlv, she, hsje, lshj, zengp, 0, 0, 0, 0, 0, 0, '否', 0, 0, '否', is_zx, '否', '否', '否', yiwchsl, 0, quxsl, 0, 0, a.pici, ******h, 0, nhshj, yhshj, jiansh, 0, '否', chbdj, 0, 0, xgdjbh, recnum, dj_sn, ydj, ndj, 0, 0, duiydjbh, duiydj_cn, lshje, '', a.miejph, beizhu, '', null, null, null, null, null, null, koulv4, thyy, zy_dy, qdchbdj, 0, a.jwh, dwbhh, 0, a.pckhdj, hsjj, ml2, hwshl, chbdj2, xsbmxz, jywdd, c.fukfs, a.pckhdj, isdstj, a.mjpihao 

from pf_djmx a,sphwph b,(select djbh,fukfs from pf_djhz) c 

where a.djbh=c.djbh and a.djbh in(select * from #a) and a.spid=b.spid and a.pici=b.pici

insert into jzorder_hz(djbh, djbs, djlx, bendian, rq, is_wlqr, is_kfqr, dwbh, ywy, bm, is_zx, shenhe, shenhr, shenhrq, shenhyj, yanshr, yansrq, jsfsid, sjsz, isjs, tkjsfs, tkje, xg, shenchr, piaohao, ysyfje, bezzs, use_ysyf, beizhu, username, kaiprq, ontime, ywbmid, ywyid, xtype, fukfs, fukqx, ydhrq, jingd, thfs, bezzs_, shenhe_, beizhu4, dfywy, fukuanfs, caig_shenhyj, caig_shenhr, caig_shenhe, caig_shenhrq, shenhe_cw, shenher_cw, shenherq_cw, shenheyj_cw, ddsj, cw_shenh, cw_shenhrq, cw_shenhyj, cw_shenhr, lxr, ywlxr, xszxshx, bmgs, rktype)

select djbh, djbs, djlx, bendian, rq, '否', '否', a.dwbh, a.ywy, bm, is_zx, shenhe, shenhr, a.shenhrq, shenhyj,

'', '', '', 0, '否', '', 0, '', '', piaohao, 0, bezzs, '否', a.beizhu, username, kaiprq, 

ontime, ywbmid, ywyid, '', fukfs, 'null', 'null', '經銷', thfs, bezzs_, shenhe_, beizhu4, '', fukuanfs, 

'', '', '', '', shenhe_cw, shenher_cw, shenherq_cw, shenheyj_cw, 

'', '', '', '', '', '', b.ywy , '', '', rktype from pf_djhz a,mchk b where djbh in(select * from #a) and a.dwbh=b.dwbh 

刪除歷史表hz資料

delete jzorder_hz_his where djbh in (select djbh from #a)

kali 系統膨脹後如何處理

2 刪除掉對應var中快取的檔案,刪除日誌檔案。會適當的增加磁碟的儲存空間。3 擴充套件新的磁碟,進行掛在到系統 扎樣做只能延緩問題,但是並不能實質性上解決 另外虛擬機器可以對磁碟實現整理和壓縮,通過再次擴充套件磁碟來增大磁碟空間 使用命令 fdisk l 檢視當前的分割槽磁碟情況,可以發現剛才新新...

ORACLE如何處理海量資料

當前資料存在的問題 一 資料量過大,資料中什麼情況都可能存在。如果說有10條資料,那麼大不了每條去逐一檢查,如果資料上到千萬級別,甚至過億,那不是手工能解決的了,必須通過工具或者程式進行處理,尤其海量的資料 二 軟硬體要求高,系統資源佔用率高。對海量的資料進行處理,除了好的方法,最重要的就是合理使用...

專案上線後出現Bug,該如何處理?

專案上線後出現bug,該如何處理?專案在上線之後又出現了bug,這讓很多測試人員和開發人員頭痛。但很多時候線上bug普遍地存在,不可避免。任何專案都存在未發現 bug和已發現 bug兩種情況,不存在沒有 bug的情況。即便是測試人員,在測試過程中也不可能發現所有bug並覆蓋 100 的範圍。乙個專案...