title: Getting numbers from character column in T-SQL
body: <p>I work with SQL Server. In my database I have a column <code>UniqueId</code> which is <code>nvarchar</code>, and contains strings with characters and numbers. I want to create another column (<code>CleanColumn</code>) getting only numbers from the column <code>UniqueId</code>, and if there aren't numbers using the whole string. Also I should lose leading zeros from column <code>UniqueId</code>. </p>
  
  <p>Is it possible in T-SQL? Or I have to use C# for that?</p>
  
  <p>The column <code>UniqueId</code> contains for example: :  </p>
  
  <pre><code>A01943486
  102-2009-1008
  A-146
  0622008081A
  Ematol OPBG
  Yavuz1098083
  Yeter1391671
  YKM
  Zabit1446123
  Zekerya13128
  Zeynep1045201 
  </code></pre>