1、科目的末级标志错误(ccode表)
可以通过脚本检查到1122这个科目有没有子科目,在科目表里的末级标志bend值是否正确
select bend ,* from code where ccode like ‘1122%’
2、总账表里存在重复记录(gl_accsum)
select * from gl_accsum where ccode='1122'
应该为12条记录,才是正常的。
3、查看辅助总账表里是否存在重复记录
使用三条语句
select bperson,bcus,bsup,bdept,bitem,* from code where ccode='1122'
select ccust_id from gl_accass where ccode='1122' group by ccus_id having count(ccode)>12
select * from gl_accass where ccode='1122' and
ccus_id in(select ccus_id from gl_accass where ccode='1122' group by ccus_id having count(ccode)>12)