title: how to store query result in a variable and dispaly it using classic ASP
body: <p>I'm using SQL server 2000 and classic ASP to display result using table i.e in HTML.
  I'm trying to get the sum of value of a column records present in SQL table .
  For that I tried this.</p>
  
  <pre><code>Balance Leave =&lt;%
                          sql= "select SUM('no_of_leave_taken') from emp_leave_details where emp_no='"&amp;request.QueryString("id")&amp;"'"  
                          rs.open sql,con,1,2
                          response.Write(con.execute sql)
                          rs.close
                          %&gt;
  </code></pre>
  
  <p>the error shown in the browser is </p>
  
  <blockquote>
    <p>The sum or average aggregate operation cannot take a varchar data type
    as an argument.</p>
  </blockquote>