用友T+升级报错:对象名称 'dbo.GL_ReferenceDocClass' 和索引名称 'ix_code' 有重复的键
问题现象:用友畅捷通T+财务软件升级报错,具体提示如下:因为发现对象名称 'dbo.GL_ReferenceDocClass' 和索引名称 'ix_code' 有重复的键,
重复数据问题SQL 脚本: 11.510.000.0000 DATA_DSTR_FI_Vou_NL.sql 出错:因为发现对象名称 'dbo.GL_ReferenceDocClass' 和索引名称 'ix_code' 有重复的键,所以 CREATE UNIQUE INDEX 语句终止。重复的键值为 (01)。语句已终止。
解决办法:根据重复的键值,找到重复的记录,然后删除(操作前请备份好您用友T+财务软件中的数据,可参考教程:https://www.ufidaft.com/jcufida/1389.html),示例语句如下:
if((select COUNT(code) from GL_ReferenceDocClass where code ='01')>1)
begin
delete from GL_ReferenceDocClass where code ='01' and ts in
(select top 1 ts from GL_ReferenceDocClass where code ='01')
end
if((select COUNT(code) from GL_ReferenceDocClass where code ='02')>1)
begin
delete from GL_ReferenceDocClass where code ='02' and ts in
(select top 1 ts from GL_ReferenceDocClass where code ='02')
end
if((select COUNT(code) from GL_ReferenceDocClass where code ='03')>1)
begin
delete from GL_ReferenceDocClass where code ='03' and ts in
(select top 1 ts from GL_ReferenceDocClass where code ='03')
end
if((select COUNT(code) from GL_ReferenceDocClass where code ='04')>1)
begin
delete from GL_ReferenceDocClass where code ='04' and ts in
(select top 1 ts from GL_ReferenceDocClass where code ='04')
end
if((select COUNT(code) from GL_ReferenceDocClass where code ='05')>1)
begin
delete from GL_ReferenceDocClass where code ='05' and ts in
(select top 1 ts from GL_ReferenceDocClass where code ='05')
end
if((select COUNT(code) from GL_ReferenceDocClass where code ='06')>1)
begin
delete from GL_ReferenceDocClass where code ='06' and ts in
(select top 1 ts from GL_ReferenceDocClass where code ='06')
end
if((select COUNT(code) from GL_ReferenceDocClass where code ='07')>1)
begin
delete from GL_ReferenceDocClass where code ='07' and ts in
(select top 1 ts from GL_ReferenceDocClass where code ='07')
end
if((select COUNT(code) from GL_ReferenceDocClass where code ='08')>1)
begin
delete from GL_ReferenceDocClass where code ='08' and ts in
(select top 1 ts from GL_ReferenceDocClass where code ='08')
end
相关文章
- erp标准财务 ERP标准财务:成本控制策略与税务合规处理全攻略——行业标杆实践与企业必备操作手册
- 财务软件多少钱最简单:常见问题与解决方法全解析
- 电商会计店铺对账怎么操作:提升效率的智能方案与资深财务都在用的流程
- 会计结转指的是什么?4个关键步骤与10个常用快捷方法助你规避财务风险
- 一个财务软件做两套账可以吗安全吗 财务软件做两套账安全吗?企业双账操作的合规风险解析
- 在财务软件上做账的顺序是什么呢 在财务软件上做账的顺序及步骤详解,新手教程指南
- 月末结转处理可以多次结账 月末结转处理支持多次结账与数据核对及报表生成
- 第三方财务软件排名榜最新:电商企业与财务人员必备的效率神器
- 福建代账会计财务软件专业版推荐与效率提升秘诀
- 财务进销存账务怎么做 月末结账与对账技巧 全面解析高效操作方法