您好,欢迎来到微智科技网。
搜索
您的当前位置:首页金蝶名称或代码在系统中已经被使用

金蝶名称或代码在系统中已经被使用

来源:微智科技网
金蝶名称或代码在系统中已经被使用

金蝶名称或代码在系统中已经被使用

1、凭证过账时系统提示:名称或代码在系统中已经被使用 错误代码:3604(E14H)

Source:Microsoft OLE DB Provider for SQL Server Detail:在结果列的列表中多次出现列名'F8' 执行语句校正即可

update d set d.fdetailcount=v.fcount from t_ItemDetail d,

(select fdetailid,count(*)fcount from t_ItemDetailv where fitemid=-1group by fdetailid)v

where d.fdetailid=v.fdetailid

不同的账套,可能会提示不同的列名,如F1等,请变通执行 错误原因:核算项目横表t_itemdetail的核算项目类别数目和科目挂的核算项目数目不一致

2、在查询科目余额表并选择包括核算项目时,系统提示: 名称或代码在系统中已被使用 错误代码:3604(E14H) Fdetail:列名'F3001'无效

补回此列,如果有数据发生还要补回数据

If Not Exists(Select http://www..com/doc/6b14476205.html, from syscolumns c,sysobjects o

where

c.Id=o.Id

and

http://www..com/doc/6b14476205.html,='F3001'and http://www..com/doc/6b14476205.html,='t_ItemDetail')

Begin

Alter Table t_ItemDetail Add F3001int not null default(0) Create Index ix_ItemDetail_3001On t_ItemDetail(F3001) END

如果还存在其他列名无效,参照修改上述SQL中的列名后,进行添加。

错误原因:在t_itemdetail表中缺少列F3001

3、录入凭证时提示错误代码:3604(E14H),Source:Microsoft OLE DB Provider for SQL Server Detail:分布式事务已完成。请将此会话登记到新事务或NULL事务中此问题是由凭证最大内码号超过21474837

造成的,请参考以下

SQL

处理

select fnewid

distinct(fvoucherid)AS

Foldid,IDENTITY(int,1,1)as

into#tmpa from t_voucher----建立新旧凭证内码对应关系

update a set a.fvoucherid=b.fnewid from t_voucher a,#tmpa b where a.fvoucherid=b.folded-----用新内码替换旧内码

update a set a.fvoucherid=b.fnewid from t_voucherentry a,#tmpa b where a.fvoucherid=b.foldid

update t_identity set fnext=(select max(fvoucherid)from t_voucher)+1where fname='t_voucher'

凭证无法过账、账薄报表无法查询、无法结转损益结转损益之后无法过帐或仍有余额,提示:在结果列中多次出现F1,名称或代码已存在等

一般是fdetailcount数目不对或者相同的核算项目组合出现重复,对于错误fdetailcount,首先要执行如下语句进行更新:

exec sp_cleanitemdetailv--横表生成纵表的存储结构

update a set a.fdetailcount=b.Fcount from t_itemdetail a join(select Fdetailid,count(Fitemid)Fcount from t_itemdetailv where fitemid<>0group by Fdetailid)b on a.fdetailid=b.fdetailid--更新fdetailcount

exec sp_cleanitemdetailv--重新生成纵表作了以上更新后发现表中还存在相同组合的重复记录,这是不允许的:

而我们只需要保留一个fdetailid即可,此时我们取最小的fdetailid,

执行如下语句更新科目表:

update t_account set

Fdetailid=(select min(fdetailid)from t_itemdetail where fdetailid in(select Fdetailid from t_i

temdetailv where fitemid=-1)and Fdetailcount=1and F2=-1)where Fdetailid in (select(fdetailid)from t_itemdetail where fdetailid in(select Fdetailid from t_itemdetailv where fitemid=-1)and Fdetailcount=1and F2=-1)

同时我们还要删除核算项目横表中的多余记录,执行如下语句: delete Fdetailid

from from

t_itemdetail t_itemdetailv and

where

Fdetailid

in(select(fdetailid)from t_itemdetail where fdetailid in(select

where

fitemid=-1)and Fdetailid<>(select

Fdetailcount=1

F2=-1)and

min(fdetailid)from t_itemdetail where fdetailid in(select Fdetailid from t_itemdetailv where fitemid=-1)and Fdetailcount=1 and F2=-1)exec sp_cleanitemdetailv--重新生成纵表

另外还要查看各余额表中有没有非法的fdetailid,即不在核算项目横纵表中的,有的话则需要删除:

--查找科目余额表中有没有非法的fdetailid

select*from t_balance where fdetailid not in(select fdetailid from t_itemdetail)

--删除科目余额表中非法的fdetailid delete from t_balance where fdetailid not in (select fdetailid from t_itemdetail)

同理进行以下操作查找数量余额表中有没有非法的fdetailid select*from t_quantitybalance where fdetailid not in(select fdetailid from t_itemdetail)

删除数量余额表中非法的fdetailid

delete from t_quantitybalance where fdetailid not in(select fdetailid from t_itemdetail)

查找损益类科目实际发生额表中有没有非法的fdetailid

select*from t_profitandloss where fdetailid not in(select

fdetailid from t_itemdetail)

删除损益类科目实际发生额表中有没有非法的fdetailid

delete from t_profitandloss where fdetailid not in(select fdetailid from t_itemdetail)根据F列进行变通,可以通过下面的语句查查

select*from t_itemdetail where fdetailid in(select fdetailid from t_itemdetailv where fitemid=-1)

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- 7swz.com 版权所有 赣ICP备2024042798号-8

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务