title: Issue with computed column in SQL Server
body: <p>In my table, I have 2 columns. One is <code>CheckNo</code> and of type <code>varchar(10)</code>. A check number or text can be entered into this column. Example of texts is <code>EFTPS</code> (electronic funds transfer) or <code>RT CHK</code> (returned check).</p>
  <p>I also have a computed column called <code>CheckNumber</code> which currently is populated with the following formula:</p>
  <pre><code>(CASE WHEN ISNUMERIC([CheckNo]) &gt; (0) THEN [CheckNo] END)
  </code></pre>
  <p>This populates column <code>CheckNumber</code> with the check number that appears in <code>CheckNo</code>.</p>
  <p>My issue is that I need the returned check number to be in a numeric data type. I have tried a number of edits to the base formula to get this to happen but I always get an error</p>
  <blockquote>
  <p>Error converting data type varchar to numeric</p>
  </blockquote>
  <p>I have tried:</p>
  <pre><code>(CASE WHEN ISNUMERIC([CheckNo]) &gt; (0) THEN CAST([CheckNo] AS numeric) END)
  
  (CASE WHEN ISNUMERIC([CheckNo]) = (1) THEN CONVERT([decimal](18, 0), [CheckNo]) ELSE (0) END)
  
  (CONVERT([numeric](18, 0), CASE WHEN ISNUMERIC([CheckNo]) = (1) THEN [CheckNo] END))
  </code></pre>
  <p>Any help would be much appreciated.</p>