title: SQL :Varchar invalid for Sum operator
body: <p>I use this code trying to get sum of 4,202 &amp; 203 but it return me error</p>
  
  <pre><code>SELECT *
  FROM
  ( SELECT id,fieldNumber,fieldData FROM iso_fields) AS SourceTable
  PIVOT
  (
   SUM(fieldData) 
  FOR fieldNumber IN ([4],[202],[203])
  ) AS PivotTable;
  </code></pre>
  
  <p>Error :</p>
  
  <pre><code>Operand data type varchar is invalid for sum operator.
  </code></pre>
  
  <p>Reason: </p>
  
  <pre><code>Table using varchar instead of int
  </code></pre>
  
  <p>What can i do about it? There is no way to alter the table back. </p>