title: Convert varchar to Decimal Arithmetic overflow error converting varchar to data type numeric
body: <p>Please can some one help me with this simple sql query</p>
  
  <pre><code>SELECT avg(CAST(NULLIF(Sim1SS,0.0) as DECIMAL)) as MTN ,
  avg(CAST(NULLIF(Sim2SS,0.0) as DECIMAL)) as Vodacom
  
  FROM [Networks].[dbo].[Device] 
  </code></pre>
  
  <p>I am getting the following error:</p>
  
  <blockquote>
    <p>Arithmetic overflow error converting varchar to data type numeric.</p>
  </blockquote>
  
  <p>and here is an example of the SS column:</p>
  
  <pre><code>28,99
  10,99
  11,99
  NULL
  NULL
  31,99
  31,99
  NULL
  </code></pre>