title: How to take Null values query expression using servlet and jsp
body: <p>I need to calculate and retrieve data from SQL server database table in my table having the <code>NoOfErrors</code> and <code>NoOfAudited</code> columns.</p>
  
  <p>I need to calculate the Accuracy based on these columns. </p>
  
  <p>I have a query like this </p>
  
  <pre><code>select 
     a.id, 
     (100-((a.NoOfErrors*100)/ NULLIF(a.NoOfAudited,0))) as Accuracy 
  from Table1 a 
   join Table2 pd 
     on a.batchid=pd.id 
  where 
    a.charge='"+Poster+"' and status=1 
  </code></pre>
  
  <p>The above query is executed only when the <code>NoOfErrors</code> and <code>NoOfAudited</code> columns contain some values.</p>
  
  <p>I have all the values but if a value in any one of the<code>NoOfErrors</code> and <code>NoOfAudited</code> columns contains <code>Null</code> value it doesn't retrieve any data, and it shows <code>No data found</code>.</p>
  
  <blockquote>
    <p>ResultSet data is not accepting null values</p>
  </blockquote>
  
  <p>How can I make the query accept null values and retrieve data by replacing null to empty in jsp table?</p>