title: SQL Server Partitioning - Unique Index Error
body: <p>I have a table that is partitioned by TRANSACTION_DATE_TIME.</p>
  
  <p>Table has a column: ID.</p>
  
  <p>I want to create a unique index for ID on partition scheme as:</p>
  
  <pre><code>CREATE UNIQUE NONCLUSTERED INDEX [IX_ID_ON_PS_DATETIME] ON [CRD].[TRANSACTION] 
  (
      [ID] ASC
  ) ON [PS_DATETIME_WEEKLY]([TRANSACTION_DATE_TIME])
  </code></pre>
  
  <p>but SQL says "Partition column for a unique index must be a subset of index key".</p>
  
  <p><strong>I really don't need TRANSACTION_DATE_TIME column in this index.</strong> </p>
  
  <p>How can I create the index without using TRANSACTION_DATE_TIME column?</p>