title: SQL CAST or Convert to SUM
body: <p>I have a table called <code>T5VAULTSL3</code> in which my clients are under the column heading <code>VL3CLIENTNUM</code> and their cash amounts are under <code>VL3CONSIDERATION</code>;</p>
  
  <p><code>VL3CONSIDERATION</code> is showing object explorer as <code>(char(20), null)</code></p>
  
  <p>What I am trying to achieve is to group all <code>'Unique'</code> client numbers where the combined cash <code>(consideration) is &gt; 10000</code></p>
  
  <p>I have tried; </p>
  
  <pre><code>SELECT vl3clientnum, CAST(VL3CONSIDERATION AS NUMERIC (20,2))
  FROM T5VAULTSL3
  WHERE Vl3CONSIDERATION &gt; 10000
  </code></pre>
  
  <p>which returns </p>
  
  <pre><code>Msg 245, Level 16, State 1, Line 1
  Conversion failed when converting the varchar value ' 0.00' to data type int.
  </code></pre>
  
  <p>So I tried </p>
  
  <pre><code>SELECT vl3clientnum, VL3CONSIDERATION
  FROM T5VAULTSL3
  WHERE CAST (Vl3CONSIDERATION AS NUMERIC (20,2)) &gt; 10000
  </code></pre>
  
  <p>which returns </p>
  
  <pre><code>Msg 8114, Level 16, State 5, Line 1
  Error converting data type varchar to numeric.
  </code></pre>
  
  <p>And</p>
  
  <pre><code>SELECT vl3clientnum, CAST (VL3CONSIDERATION AS NUMERIC (20,2)) AS CONSIDERATION
  FROM T5VAULTSL3
  WHERE CAST (Vl3CONSIDERATION AS NUMERIC (20,2)) &gt; 10000
  </code></pre>
  
  <p>which returns </p>
  
  <pre><code>Msg 8114, Level 16, State 5, Line 1
  Error converting data type varchar to numeric.
  </code></pre>
  
  <p>Would I have to use the 'Declare' functionality and if so how?  A little stumped by this one... </p>
  
  <p>Other attempts have included.</p>
  
  <pre><code>SELECT vl3clientnum, CAST (VL3CONSIDERATION AS NUMERIC (20,2))
  FROM T5VAULTSL3
  WHERE VL3CONSIDERATION &gt; 10000
  GROUP BY VL3CLIENTNUM, vl3consideration
  
  Msg 245, Level 16, State 1, Line 1
  Conversion failed when converting the varchar value ' 0.00' to data type int.
  
  
  SELECT vl3clientnum, VL3CONSIDERATION
  FROM T5VAULTSL3
  WHERE CAST (VL3CONSIDERATION as NUMERIC(20,2)) &gt; 10000
  GROUP BY VL3CLIENTNUM, vl3consideration
  
  Msg 8114, Level 16, State 5, Line 1
  Error converting data type varchar to numeric.
  </code></pre>
  
  <p>Absoultely perplexed!!!!  </p>