title: Replacing commas and converting to INT in Teradata with SELECT
body: <p>I'm retrieving records from a Teradata DB. The field "CUST_NO" is type VARCHAR. If I use</p>
  
  <pre><code>SELECT CUST_NO FROM TABLE
  </code></pre>
  
  <p>the output is along the lines of</p>
  
  <pre><code>123,456
  321,654
  </code></pre>
  
  <p>though the position of the comma can vary. I want to remove these commas, and return the values as type INT. I've tried a couple of variations of</p>
  
  <pre><code>SELECT CAST(REPLACE(CUST_NO,',','') AS INT) AS CUST_NO FROM TABLE
  </code></pre>
  
  <p>but I'm getting syntax errors. Could anyone remedy this issue?</p>