title: How do I fix this data type error?
body: <p>When I insert the following into my query I get an error</p>
  
  <pre><code>,max(case when patins.rank = 1.0 then CLAIMS.[TOTALPAID] else '' end)
  </code></pre>
  
  <p><code>TotalPaid</code> is a field that contains, for example: <code>445.45</code>.</p>
  
  <p>The message I receive is:</p>
  
  <blockquote>
    <p>Error converting data type varchar to numeric</p>
  </blockquote>
  
  <p>but, this case statement works:</p>
  
  <pre><code>,max(case when patins.rank = 1.0 then INSCOMP.ORG else '' end)
  </code></pre>
  
  <p><code>Inscomp.Org</code> just gives the insurance company.</p>