用友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
相关文章
- 安卓系统财务软件有哪些软件:免费支持多账套的财务应用推荐
- 财务软件升级后如何摊销费用呢 财务软件升级后费用如何摊销?合规处理与专家解读全解析
- 财务会计关于库存现金核算 太及时了!库存现金核算问题全解答及常见错误解析
- 乡镇经营管理站会计核算:村集体财务井井有条,新人7天轻松上手记账
- 会计的七大结转与账务流程闭环管理及对企业年度报表的影响深度解析
- 财务+进销存软件 2024年财务进销存软件趋势:一键生成三大报表,助力企业降本增效
- 云代账中国财务软件排行榜全景解读:从用户口碑洞察产品表现,助力企业提升财务管理效率
- 康桥镇会计对账常见问题解析与凭证管理优化策略,新手快速上手指南
- 红字发票跨年度可以吗?会计必看2024跨年冲红全攻略,轻松应对新变化
- 哪些财务软件可一键报税的呢 效率翻倍又合规:6款通过税局认证的一键报税财务软件推荐




