【问】日结问题 | ||
【适用版本】商云8 | 【模块】 | 【点击数】132 |
【知识编号】72017111600006 | ||
【问题描述】日结失败提示:错误信息:-1 不能在具有唯一索引‘i-da-jxc-daysum-5’的对象‘dbo 1-da-jxc-daysum’中插入重复键的行 |
—修复索引
use hbposv8 —-分店改为hbposv8_branch
go
declare @tablename varchar(100)
declare test_cur cursor for
select object_name(id) from sysobjects
where type =’U’
open test_cur
fetch test_cur into @tablename
while @@fetch_status=0
begin
DBCC DBREINDEX(@tablename)
fetch test_cur into @tablename
end
close test_cur
deallocate test_cur
go