title: how to handle null in date field of postgresql
body: <p>I have to ignore rows which have <code>null</code> in date column. How can I do it?</p>
  
  <pre><code>select s."SR Closed Date"::date,
         s."Service Request Number",
         a."Activity ID" 
  from sr_data_master s,
       activity_master a
  where s."Service Request Number" = a."Service Request Number"
  and a."Service Request Number" is not null 
  and a."Service Tag" is not null 
  and a."Activity ID" is not null
  and s."SR Closed Date"::date is not NULL
  group by s."Service Request Number",
           s."SR Closed Date"::date,
           a."Activity ID";
  </code></pre>
  
  <p>I am getting the error: </p>
  
  <pre><code> invalid input syntax for type date: "NULL" 
  </code></pre>