title: Generate DISTINCT Lists with ID T-SQL
body: <p>For use in SSRS multi-select dropdowns, I need to generate multiple DISTINCT lists of values.</p>
  
  <p>This is easily done. <code>Select DISTINCT Department from DimEmployee</code></p>
  
  <p>In order to set an SSRS default value, you must have an ID field also in your data set.. this is not achieved by the above query</p>
  
  <p>I need to assign an arbitrary uniqueID to each of these records from my distinct list</p>
  
  <p>Any advice appreciated.</p>
  
  <p>Final output would be:</p>
  
  <pre><code>Select * From dsDeptList
  </code></pre>
  
  <p>Results...</p>
  
  <pre><code>ID   |   DeptName
  
  1    |   DeptName1
  2    |   DeptName2
  etc.....
  </code></pre>