title: Checking if data violates SQL decimal constraint
body: <p>I have a table that is getting a column changed from a <code>VARCHAR</code> to <code>DECIMAL(20,7)</code> data type. I need find out what rows have a value in the column that <strong>violates</strong> the <code>DECIMAL(20,7)</code> data type and I believe I am close. </p>
  
  <p>What I have so far is this:</p>
  
  <pre><code>SELECT * 
  FROM tableName
  WHERE 
       (ISNUMERIC(columnName)  = 0 and columnName IS NOT NULL)
       OR (columnName LIKE '%,%')
       OR (LEN(columnName) &gt; 20)
  </code></pre>
  
  <p>I think I am mostly hung up on the the <code>LEN</code> check, as I can still miss results. Is there a way to get deeper into the length so I can check with precision, instead of just a length of 20?</p>