title: C# sql command can not search the Total Cost
body: <p>I am designing a form to show the total cost on the listbox. I find that
  there is a error when I try to run this command</p>
  
  <p>my purpose is show the courseID , numberOfStudent and the Total cost(the sum of column "operatingCost" and column"materialFee") </p>
  
  <p>I want to search the TotalCost between two value.(the value of "price1" textbox and "price2" textbox) for example search all the totalCost between 700 and 1000</p>
  
  <p>but after running the command there is an error shown on the message box  </p>
  
  <p>the error message is about
   ErrorSystem.Date.OleDB.OleDbExceptionError(0x80040E14) select query Operator
  sum(operatingCost + materialFee) >='700' andd &lt;='1000'  missing Operator</p>
  
  <pre><code> OleDbCommand cmd = new OleDbCommand("select courseId ,numOfStudent,sum( operatingCost + materialFee) AS Total_Cost from course group by courseId , numOfStudent having sum(operatingCost + materialFee) &gt;= '" + price1.Text + "' and =&lt;'" + price2.Text + "'", connection);
  </code></pre>
  
  <p>Where is my problem?Can somebody tell me please?</p>