title: Unable to create index because of duplicate that doesn't exist?
body: <p>I'm getting an error running the following Transact-SQL command:</p>
  
  <pre><code>CREATE UNIQUE NONCLUSTERED INDEX IX_TopicShortName
  ON DimMeasureTopic(TopicShortName)
  </code></pre>
  
  <p>The error is:</p>
  
  <blockquote>
    <p>Msg 1505, Level 16, State 1, Line 1
    The CREATE UNIQUE INDEX statement
    terminated because a duplicate key was
    found for the object name
    'dbo.DimMeasureTopic' and the index
    name 'IX_TopicShortName'. The
    duplicate key value is ().</p>
  </blockquote>
  
  <p>When I run <code>SELECT * FROM sys.indexes WHERE name = 'IX_TopicShortName'</code> or <code>SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[DimMeasureTopic]')</code> the IX_TopicShortName index does not display. So there doesn't appear to be a duplicate.</p>
  
  <p>I have the same schema in another database and can create the index without issues there. Any ideas why it won't create here?</p>