title: Query Error with Having Clause using computed column
body: <p>I am trying to find nearest locations based on latitude and longitude by using the locations in  my database.
  Here is my query:</p>
  
  <pre><code>select *,
  acos(cos(33.7103820972222 * (PI()/180)) *
   cos(73.05794 * (PI()/180)) *
   cos(Lat * (PI()/180)) *
   cos(Lon * (PI()/180))
   +
   cos(33.7103820972222 * (PI()/180)) *
   sin(73.05794 * (PI()/180)) *
   cos(Lat * (PI()/180)) *
   sin(Lon * (PI()/180))
   +
   sin(33.7103820972222 * (PI()/180)) *
   sin(73.05794 * (PI()/180))
  ) * 3959 AS Dist from tblOrg having Dist &lt; 5 order by Dist
  </code></pre>
  
  <p>I am having error in Dist in the below line
  <code>having Dist &lt; 5</code>.</p>