日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

记帐数据只记部分后如何处理

發布時間:2025/3/19 编程问答 22 豆豆
生活随笔 收集整理的這篇文章主要介紹了 记帐数据只记部分后如何处理 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

查詢記賬中間表中是否有數據

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, fapiaoh, 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, fapiaoh, 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)



本文轉自 qvodnet 51CTO博客,原文鏈接:http://blog.51cto.com/bks2015/1933370

總結

以上是生活随笔為你收集整理的记帐数据只记部分后如何处理的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。