用友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
相关文章
- 用友t3账套怎样变更会计制度 用友T3账套变更会计制度:业务场景应用与操作流程详解
- 自己做代理记账财务软件有哪些 自己做代理记账财务软件哪家好 深度解析需求必备神器助你快速上手
- 结转本月费用 会计分录 结转本月费用会计分录最新注意事项与案例解析避免错误快速掌握核心要点
- 购买财务软件计什么科目:解决办法与特殊情况考虑
- 畅捷通t3财务通普及版 畅捷通T3财务通普及版:满足企业日常财务管理需求的应用价值
- 物流企业财务制度:专为中小企业设计的管理方案,细节决定成败!
- 红字发票可以做报销凭证吗 红字发票能否作为报销凭证?全面解析与常见误区规避
- 物流运输用什么财务软件最好最权威高效的解决方案推荐
- 用友u8 结转 折旧 用友U8结转折旧:简单高效,中小企业必备的财务解决方案!
- 用友t3备份账套要多久完成 用友T3备份账套要多久完成 快速高效让数据更安全不等待!