我会过滤一个唯一索引以避免重复文档,但此过滤器应该取决于外表中存在的值
CREATE UNIQUE NONCLUSTERED INDEX [NonClusteredIndex-20131227-100837]
ON [dbo].[Documents]([ContactID] ASC, [Type] ASC, [AutoID] ASC)
WHERE ((select top 1 ID from [dbo].[AutoRequirementDocuments] where [Quantity]='Once' and [ID] = [AutoID])>0)
语法不正确;是否有正确的语法?