title: SQL Server CAST from varchar to numeric fails with error
body: <p>I have a column of data that contains 9 digits of numeric values, but the column is defined as a varchar. I need to CAST the field to a numeric value so I can divide the sum of the column by 100. e.g.</p>
  
  <pre><code>select CAST(field1 as numeric(9,2)) / 100 from table;
  </code></pre>
  
  <p>I get the following error when running the query: Arithmetic overflow error converting varchar to data type numeric.</p>
  
  <p>If I perform a double CAST from varchar -> int -> numeric, the CAST works. e.g.</p>
  
  <pre><code>select CAST(CAST(field1 as int) as numeric(9,2)) / 100 from table;
  </code></pre>
  
  <p>Is there a reason why the single CAST from varchar -> numeric results in a SQL error, but the double CAST works? </p>