title: Try_Convert for SQL Server 2008 R2
body: <p>I'm using SQL Server 2008 R2 and have a <code>VARCHAR</code> column I want to convert to <code>DECIMAL(28,10)</code> using <code>CONVERT</code>. But many of those rows are badly formatted, so it is not possible to parse them to a number. In that case I just want to skip those by setting result to 0 or NULL.</p>
  
  <p>I know there is a new statement in SQL Server 2012 (<code>TRY_CONVERT()</code>) that would be handy.</p>
  
  <p>Is this possible in 2008 or must I wait until we update to next version SQL 2012?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Unfortunately <code>ISNUMERIC()</code> is not reliable in this case.
  I tried </p>
  
  <pre><code>ISNUMERIC(myCol) = 1
  </code></pre>
  
  <p>That returns true for rows that <code>CONVERT</code> is not able to convert to <code>DECIMAL</code>.</p>