title: SQL: how to get all the distinct characters in a column, across all rows
body: <p>Is there an elegant way in SQL Server to find all the distinct characters in a single varchar(50) column, across all rows?</p>
  
  <p>Bonus points if it can be done without cursors :)</p>
  
  <p>For example, say my data contains 3 rows:</p>
  
  <pre><code>productname
  -----------
  product1
  widget2
  nicknack3
  </code></pre>
  
  <p>The distinct inventory of characters would be "productwigenka123"</p>