我创建了一个唯一索引(如果IsDelete!= 1,则案例描述应该是唯一的)
CREATE UNIQUE NONCLUSTERED INDEX [UniqueCaseDescription] ON [tblCases] ([fldCaseDescription] ASC) WHERE [IsDeleted] = CAST(0 AS varbinary(1)) WITH (PAD_INDEX = OFF,STATISTICS_NORECOMPUTE = OFF,SORT_IN_TEMPDB = OFF,IGNORE_DUP_KEY = OFF,DROP_EXISTING = OFF,ONLINE = OFF,ALLOW_ROW_LOCKS = ON,ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
然后,当我运行以下过程时,它会抛出’UPDATE失败,因为以下SET选项具有不正确的设置:’ARITHABORT’.验证SET选项是否正确用于过滤索引.
ALTER PROC [usp_DeleteCase] (@fldCaseID UNIQUEIDENTIFIER) AS BEGIN UPDATE tblCases SET IsDeleted = 1 WHERE fldCaseID = @fldCaseID RETURN 1 END
我尝试在UPDATE语句之前添加SET ARITHABORT ON,但是没有做任何事情.
任何帮助是极大的赞赏!