浪潮软件怎么将一个账套总账期末余额转入到另外一个账套里面

将cwbase4总账期末余额转入cwbase10.

场景:cwbase4 是2019、2020的数据,但是尚未进行2019的年结。客户还需要进行2019、2020的小改动。
cwbase10是2021、2022的数据,基础数据均和cwbase4一致。现需要将期初数字转过来。未使用数量核算。
这个场景,特别适合企业需要进行历年数据核对的时候,多年都同时开工。

注意:
1、cwbase4必须保证全部记账。cwbase10,必须全部凭证未记账。
2、cwbase10中新增科目,必须在cwbase4中也增加一次。单位、个人等无需增加。
3、可以多次执行。修改了一次cwbase4,可以再次执行语句。
4、

delete cwbase10.lc0109999.zwkmje
delete cwbase10.lc0109999.zwfzje

insert into cwbase10.lc0109999.zwkmje (zwkmje_kmbh,zwkmje_kjnd,zwkmje_kjqj,zwkmje_ncye,zwkmje_jflj,zwkmje_dflj,zwkmje_jffs,zwkmje_dffs,zwkmje_dqye)
select zwkmje_kmbh,’2021′,’01′,zwkmje_dqye,0,0,0,0,zwkmje_dqye from cwbase4.lc0049999.zwkmje where zwkmje_kjnd=’2020′ and zwkmje_kjqj=’12′ union all
select zwkmje_kmbh,’2021′,’02′,zwkmje_dqye,0,0,0,0,zwkmje_dqye from cwbase4.lc0049999.zwkmje where zwkmje_kjnd=’2020′ and zwkmje_kjqj=’12′ union all
select zwkmje_kmbh,’2021′,’03′,zwkmje_dqye,0,0,0,0,zwkmje_dqye from cwbase4.lc0049999.zwkmje where zwkmje_kjnd=’2020′ and zwkmje_kjqj=’12′ union all
select zwkmje_kmbh,’2021′,’04′,zwkmje_dqye,0,0,0,0,zwkmje_dqye from cwbase4.lc0049999.zwkmje where zwkmje_kjnd=’2020′ and zwkmje_kjqj=’12′ union all
select zwkmje_kmbh,’2021′,’05′,zwkmje_dqye,0,0,0,0,zwkmje_dqye from cwbase4.lc0049999.zwkmje where zwkmje_kjnd=’2020′ and zwkmje_kjqj=’12′ union all
select zwkmje_kmbh,’2021′,’06′,zwkmje_dqye,0,0,0,0,zwkmje_dqye from cwbase4.lc0049999.zwkmje where zwkmje_kjnd=’2020′ and zwkmje_kjqj=’12′ union all
select zwkmje_kmbh,’2021′,’07′,zwkmje_dqye,0,0,0,0,zwkmje_dqye from cwbase4.lc0049999.zwkmje where zwkmje_kjnd=’2020′ and zwkmje_kjqj=’12′ union all
select zwkmje_kmbh,’2021′,’08′,zwkmje_dqye,0,0,0,0,zwkmje_dqye from cwbase4.lc0049999.zwkmje where zwkmje_kjnd=’2020′ and zwkmje_kjqj=’12′ union all
select zwkmje_kmbh,’2021′,’09′,zwkmje_dqye,0,0,0,0,zwkmje_dqye from cwbase4.lc0049999.zwkmje where zwkmje_kjnd=’2020′ and zwkmje_kjqj=’12′ union all
select zwkmje_kmbh,’2021′,’10′,zwkmje_dqye,0,0,0,0,zwkmje_dqye from cwbase4.lc0049999.zwkmje where zwkmje_kjnd=’2020′ and zwkmje_kjqj=’12′ union all
select zwkmje_kmbh,’2021′,’11′,zwkmje_dqye,0,0,0,0,zwkmje_dqye from cwbase4.lc0049999.zwkmje where zwkmje_kjnd=’2020′ and zwkmje_kjqj=’12′ union all
select zwkmje_kmbh,’2021′,’12′,zwkmje_dqye,0,0,0,0,zwkmje_dqye from cwbase4.lc0049999.zwkmje where zwkmje_kjnd=’2020′ and zwkmje_kjqj=’12′ union all
select zwkmje_kmbh,’2022′,’01′,zwkmje_dqye,0,0,0,0,zwkmje_dqye from cwbase4.lc0049999.zwkmje where zwkmje_kjnd=’2020′ and zwkmje_kjqj=’12′ union all
select zwkmje_kmbh,’2022′,’02′,zwkmje_dqye,0,0,0,0,zwkmje_dqye from cwbase4.lc0049999.zwkmje where zwkmje_kjnd=’2020′ and zwkmje_kjqj=’12′ union all
select zwkmje_kmbh,’2022′,’03′,zwkmje_dqye,0,0,0,0,zwkmje_dqye from cwbase4.lc0049999.zwkmje where zwkmje_kjnd=’2020′ and zwkmje_kjqj=’12′ union all
select zwkmje_kmbh,’2022′,’04′,zwkmje_dqye,0,0,0,0,zwkmje_dqye from cwbase4.lc0049999.zwkmje where zwkmje_kjnd=’2020′ and zwkmje_kjqj=’12′ union all
select zwkmje_kmbh,’2022′,’05′,zwkmje_dqye,0,0,0,0,zwkmje_dqye from cwbase4.lc0049999.zwkmje where zwkmje_kjnd=’2020′ and zwkmje_kjqj=’12′ union all
select zwkmje_kmbh,’2022′,’06′,zwkmje_dqye,0,0,0,0,zwkmje_dqye from cwbase4.lc0049999.zwkmje where zwkmje_kjnd=’2020′ and zwkmje_kjqj=’12′ union all
select zwkmje_kmbh,’2022′,’07′,zwkmje_dqye,0,0,0,0,zwkmje_dqye from cwbase4.lc0049999.zwkmje where zwkmje_kjnd=’2020′ and zwkmje_kjqj=’12′ union all
select zwkmje_kmbh,’2022′,’08′,zwkmje_dqye,0,0,0,0,zwkmje_dqye from cwbase4.lc0049999.zwkmje where zwkmje_kjnd=’2020′ and zwkmje_kjqj=’12′ union all
select zwkmje_kmbh,’2022′,’09′,zwkmje_dqye,0,0,0,0,zwkmje_dqye from cwbase4.lc0049999.zwkmje where zwkmje_kjnd=’2020′ and zwkmje_kjqj=’12′ union all
select zwkmje_kmbh,’2022′,’10′,zwkmje_dqye,0,0,0,0,zwkmje_dqye from cwbase4.lc0049999.zwkmje where zwkmje_kjnd=’2020′ and zwkmje_kjqj=’12′ union all
select zwkmje_kmbh,’2022′,’11′,zwkmje_dqye,0,0,0,0,zwkmje_dqye from cwbase4.lc0049999.zwkmje where zwkmje_kjnd=’2020′ and zwkmje_kjqj=’12′ union all
select zwkmje_kmbh,’2022′,’12′,zwkmje_dqye,0,0,0,0,zwkmje_dqye from cwbase4.lc0049999.zwkmje where zwkmje_kjnd=’2020′ and zwkmje_kjqj=’12′

insert into cwbase10.lc0109999.zwfzje(zwfzje_kjnd,zwfzje_kjqj,zwfzje_kmbh,zwfzje_bmbh,zwfzje_dwbh,zwfzje_zgbh,zwfzje_xm01,zwfzje_xm02,zwfzje_xm03,zwfzje_xm04,zwfzje_xm05,zwfzje_ncye,zwfzje_jflj,zwfzje_dflj,zwfzje_jffs,zwfzje_dffs,zwfzje_dqye)
select ’2021′,’01′,zwfzje_kmbh,zwfzje_bmbh,zwfzje_dwbh,zwfzje_zgbh,zwfzje_xm01,zwfzje_xm02,zwfzje_xm03,zwfzje_xm04,zwfzje_xm05,zwfzje_dqye,0,0,0,0,zwfzje_dqye from cwbase4.lc0049999.zwfzje where zwfzje_kjnd=’2020′ and zwfzje_kjqj=’12′ union all
select ’2021′,’02′,zwfzje_kmbh,zwfzje_bmbh,zwfzje_dwbh,zwfzje_zgbh,zwfzje_xm01,zwfzje_xm02,zwfzje_xm03,zwfzje_xm04,zwfzje_xm05,zwfzje_dqye,0,0,0,0,zwfzje_dqye from cwbase4.lc0049999.zwfzje where zwfzje_kjnd=’2020′ and zwfzje_kjqj=’12′ union all
select ’2021′,’03′,zwfzje_kmbh,zwfzje_bmbh,zwfzje_dwbh,zwfzje_zgbh,zwfzje_xm01,zwfzje_xm02,zwfzje_xm03,zwfzje_xm04,zwfzje_xm05,zwfzje_dqye,0,0,0,0,zwfzje_dqye from cwbase4.lc0049999.zwfzje where zwfzje_kjnd=’2020′ and zwfzje_kjqj=’12′ union all
select ’2021′,’04′,zwfzje_kmbh,zwfzje_bmbh,zwfzje_dwbh,zwfzje_zgbh,zwfzje_xm01,zwfzje_xm02,zwfzje_xm03,zwfzje_xm04,zwfzje_xm05,zwfzje_dqye,0,0,0,0,zwfzje_dqye from cwbase4.lc0049999.zwfzje where zwfzje_kjnd=’2020′ and zwfzje_kjqj=’12′ union all
select ’2021′,’05′,zwfzje_kmbh,zwfzje_bmbh,zwfzje_dwbh,zwfzje_zgbh,zwfzje_xm01,zwfzje_xm02,zwfzje_xm03,zwfzje_xm04,zwfzje_xm05,zwfzje_dqye,0,0,0,0,zwfzje_dqye from cwbase4.lc0049999.zwfzje where zwfzje_kjnd=’2020′ and zwfzje_kjqj=’12′ union all
select ’2021′,’06′,zwfzje_kmbh,zwfzje_bmbh,zwfzje_dwbh,zwfzje_zgbh,zwfzje_xm01,zwfzje_xm02,zwfzje_xm03,zwfzje_xm04,zwfzje_xm05,zwfzje_dqye,0,0,0,0,zwfzje_dqye from cwbase4.lc0049999.zwfzje where zwfzje_kjnd=’2020′ and zwfzje_kjqj=’12′ union all
select ’2021′,’07′,zwfzje_kmbh,zwfzje_bmbh,zwfzje_dwbh,zwfzje_zgbh,zwfzje_xm01,zwfzje_xm02,zwfzje_xm03,zwfzje_xm04,zwfzje_xm05,zwfzje_dqye,0,0,0,0,zwfzje_dqye from cwbase4.lc0049999.zwfzje where zwfzje_kjnd=’2020′ and zwfzje_kjqj=’12′ union all
select ’2021′,’08′,zwfzje_kmbh,zwfzje_bmbh,zwfzje_dwbh,zwfzje_zgbh,zwfzje_xm01,zwfzje_xm02,zwfzje_xm03,zwfzje_xm04,zwfzje_xm05,zwfzje_dqye,0,0,0,0,zwfzje_dqye from cwbase4.lc0049999.zwfzje where zwfzje_kjnd=’2020′ and zwfzje_kjqj=’12′ union all
select ’2021′,’09′,zwfzje_kmbh,zwfzje_bmbh,zwfzje_dwbh,zwfzje_zgbh,zwfzje_xm01,zwfzje_xm02,zwfzje_xm03,zwfzje_xm04,zwfzje_xm05,zwfzje_dqye,0,0,0,0,zwfzje_dqye from cwbase4.lc0049999.zwfzje where zwfzje_kjnd=’2020′ and zwfzje_kjqj=’12′ union all
select ’2021′,’10′,zwfzje_kmbh,zwfzje_bmbh,zwfzje_dwbh,zwfzje_zgbh,zwfzje_xm01,zwfzje_xm02,zwfzje_xm03,zwfzje_xm04,zwfzje_xm05,zwfzje_dqye,0,0,0,0,zwfzje_dqye from cwbase4.lc0049999.zwfzje where zwfzje_kjnd=’2020′ and zwfzje_kjqj=’12′ union all
select ’2021′,’11′,zwfzje_kmbh,zwfzje_bmbh,zwfzje_dwbh,zwfzje_zgbh,zwfzje_xm01,zwfzje_xm02,zwfzje_xm03,zwfzje_xm04,zwfzje_xm05,zwfzje_dqye,0,0,0,0,zwfzje_dqye from cwbase4.lc0049999.zwfzje where zwfzje_kjnd=’2020′ and zwfzje_kjqj=’12′ union all
select ’2021′,’12′,zwfzje_kmbh,zwfzje_bmbh,zwfzje_dwbh,zwfzje_zgbh,zwfzje_xm01,zwfzje_xm02,zwfzje_xm03,zwfzje_xm04,zwfzje_xm05,zwfzje_dqye,0,0,0,0,zwfzje_dqye from cwbase4.lc0049999.zwfzje where zwfzje_kjnd=’2020′ and zwfzje_kjqj=’12′ union all
select ’2022′,’01′,zwfzje_kmbh,zwfzje_bmbh,zwfzje_dwbh,zwfzje_zgbh,zwfzje_xm01,zwfzje_xm02,zwfzje_xm03,zwfzje_xm04,zwfzje_xm05,zwfzje_dqye,0,0,0,0,zwfzje_dqye from cwbase4.lc0049999.zwfzje where zwfzje_kjnd=’2020′ and zwfzje_kjqj=’12′ union all
select ’2022′,’02′,zwfzje_kmbh,zwfzje_bmbh,zwfzje_dwbh,zwfzje_zgbh,zwfzje_xm01,zwfzje_xm02,zwfzje_xm03,zwfzje_xm04,zwfzje_xm05,zwfzje_dqye,0,0,0,0,zwfzje_dqye from cwbase4.lc0049999.zwfzje where zwfzje_kjnd=’2020′ and zwfzje_kjqj=’12′ union all
select ’2022′,’03′,zwfzje_kmbh,zwfzje_bmbh,zwfzje_dwbh,zwfzje_zgbh,zwfzje_xm01,zwfzje_xm02,zwfzje_xm03,zwfzje_xm04,zwfzje_xm05,zwfzje_dqye,0,0,0,0,zwfzje_dqye from cwbase4.lc0049999.zwfzje where zwfzje_kjnd=’2020′ and zwfzje_kjqj=’12′ union all
select ’2022′,’04′,zwfzje_kmbh,zwfzje_bmbh,zwfzje_dwbh,zwfzje_zgbh,zwfzje_xm01,zwfzje_xm02,zwfzje_xm03,zwfzje_xm04,zwfzje_xm05,zwfzje_dqye,0,0,0,0,zwfzje_dqye from cwbase4.lc0049999.zwfzje where zwfzje_kjnd=’2020′ and zwfzje_kjqj=’12′ union all
select ’2022′,’05′,zwfzje_kmbh,zwfzje_bmbh,zwfzje_dwbh,zwfzje_zgbh,zwfzje_xm01,zwfzje_xm02,zwfzje_xm03,zwfzje_xm04,zwfzje_xm05,zwfzje_dqye,0,0,0,0,zwfzje_dqye from cwbase4.lc0049999.zwfzje where zwfzje_kjnd=’2020′ and zwfzje_kjqj=’12′ union all
select ’2022′,’06′,zwfzje_kmbh,zwfzje_bmbh,zwfzje_dwbh,zwfzje_zgbh,zwfzje_xm01,zwfzje_xm02,zwfzje_xm03,zwfzje_xm04,zwfzje_xm05,zwfzje_dqye,0,0,0,0,zwfzje_dqye from cwbase4.lc0049999.zwfzje where zwfzje_kjnd=’2020′ and zwfzje_kjqj=’12′ union all
select ’2022′,’07′,zwfzje_kmbh,zwfzje_bmbh,zwfzje_dwbh,zwfzje_zgbh,zwfzje_xm01,zwfzje_xm02,zwfzje_xm03,zwfzje_xm04,zwfzje_xm05,zwfzje_dqye,0,0,0,0,zwfzje_dqye from cwbase4.lc0049999.zwfzje where zwfzje_kjnd=’2020′ and zwfzje_kjqj=’12′ union all
select ’2022′,’08′,zwfzje_kmbh,zwfzje_bmbh,zwfzje_dwbh,zwfzje_zgbh,zwfzje_xm01,zwfzje_xm02,zwfzje_xm03,zwfzje_xm04,zwfzje_xm05,zwfzje_dqye,0,0,0,0,zwfzje_dqye from cwbase4.lc0049999.zwfzje where zwfzje_kjnd=’2020′ and zwfzje_kjqj=’12′ union all
select ’2022′,’09′,zwfzje_kmbh,zwfzje_bmbh,zwfzje_dwbh,zwfzje_zgbh,zwfzje_xm01,zwfzje_xm02,zwfzje_xm03,zwfzje_xm04,zwfzje_xm05,zwfzje_dqye,0,0,0,0,zwfzje_dqye from cwbase4.lc0049999.zwfzje where zwfzje_kjnd=’2020′ and zwfzje_kjqj=’12′ union all
select ’2022′,’10′,zwfzje_kmbh,zwfzje_bmbh,zwfzje_dwbh,zwfzje_zgbh,zwfzje_xm01,zwfzje_xm02,zwfzje_xm03,zwfzje_xm04,zwfzje_xm05,zwfzje_dqye,0,0,0,0,zwfzje_dqye from cwbase4.lc0049999.zwfzje where zwfzje_kjnd=’2020′ and zwfzje_kjqj=’12′ union all
select ’2022′,’11′,zwfzje_kmbh,zwfzje_bmbh,zwfzje_dwbh,zwfzje_zgbh,zwfzje_xm01,zwfzje_xm02,zwfzje_xm03,zwfzje_xm04,zwfzje_xm05,zwfzje_dqye,0,0,0,0,zwfzje_dqye from cwbase4.lc0049999.zwfzje where zwfzje_kjnd=’2020′ and zwfzje_kjqj=’12′ union all
select ’2022′,’12′,zwfzje_kmbh,zwfzje_bmbh,zwfzje_dwbh,zwfzje_zgbh,zwfzje_xm01,zwfzje_xm02,zwfzje_xm03,zwfzje_xm04,zwfzje_xm05,zwfzje_dqye,0,0,0,0,zwfzje_dqye from cwbase4.lc0049999.zwfzje where zwfzje_kjnd=’2020′ and zwfzje_kjqj=’12′

 

原创文章,转载请注明: 转载自浪潮888博客

本文链接地址: 浪潮软件怎么将一个账套总账期末余额转入到另外一个账套里面

文章的脚注信息由WordPress的wp-posturl插件自动生成



This entry was posted in ERP动态, 个人总结, 浪潮文档. Bookmark the permalink.

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>