title: SQL arithmetic with variable operator
body: <p>I have a query that generates the results of the following where fldNum is a float field, fldOp is a nvarchar field which returns the values of either '/' or '*', and fldCalc is varchar field which actually contains numbers; when I attempt to execute this it won't work at all however, I get an error of nvarchar to float conversion error...</p>
  
  <pre><code>                                   ([fldNum] + [fldOp] + Convert(float,[fldCalc]))
  example data if fldOp is a '/'     (0.5533/34)
  </code></pre>
  
  <p>I used a case statement such as the following, which works fine...</p>
  
  <pre><code>(CASE WHEN [fldOp] = '/' THEN ([fldNum]/Convert(float,[fldCalc])) 
   ELSE ([fldNum]*Convert(float,[fldCalc])) END)
  </code></pre>
  
  <p>I need something that is more dynamic however in the case that I need to add a + or - to the fldOperator field. Is there anyway of doing this?</p>