问题解决办法
1、先备份科目
select * into t_bd_account_1125 from T_BD_ACCOUNT
2、查出问题凭证
select distinct b.FNUMBER as 帐簿编码,v.FYEAR as 年度,v.FPERIOD as 期间,g.FNAME as 凭证字, v.FVOUCHERGROUPNO as 凭证号 from T_GL_VOUCHERENTRY ve inner join T_GL_VOUCHER v on v.FVOUCHERID=ve.FVOUCHERID
inner join T_BD_ACCOUNTBOOK b on v.FACCOUNTBOOKID=b.FBOOKID
inner join T_BD_VOUCHERGROUP_L g on v.FVOUCHERGROUPID=g.FVCHGROUPID and g.FLOCALEID=2052
where FACCOUNTID in(
select FACCTID from T_BD_ACCOUNT where FACCTTBLID=2001 and FHELPERCODE like ‘%/_1‘escape ‘/‘)
3、通过凭证列表导出凭证
(通过步骤2找出的凭证去凭证列表过滤,然后引出到Excel)
4、删除错误科目
delete from T_BD_ACCOUNT where FACCTID in(select FACCTID from T_BD_ACCOUNT where FACCTTBLID=2001 and FHELPERCODE like ‘%/_1‘escape ‘/‘))
5、再引入凭证
引入步骤3中引出的Excel凭证
注意:操作步骤前后属性不能乱
原文地址:http://blog.51cto.com/yataigp/2320948