title: Cast or convert varchar in SQL Server to INT
body: <p>I am trying to convert the following to an integer so that I can do calculations, from <code>123.456.789</code> to <code>123456789</code>.</p>
  
  <p>However, when I try</p>
  
  <pre><code>CAST([Total number] AS INT)
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>CONVERT(int, [Total number])
  </code></pre>
  
  <p>then I get an error </p>
  
  <blockquote>
    <p>Conversion failed when converting the varchar value '123.456.789' to data type int.</p>
  </blockquote>