title: Oracle DECODE Syntax
body: <p>Problem:
  I'm deciphering a query that as a function called DECODE. I looked up the syntax (Column, value, replacement value, default) but I do not undertand what the below syntax is doing. </p>
  
  <p>Query:</p>
  
  <pre><code>WHERE 1=1
    AND DECODE(a1.prev_start_date, NULL, 'THIS IS NOT NULL', a1.prev_end_date) IS NOT NULL 
  </code></pre>
  
  <p>When I add the above syntax the below row does not display, why?</p>
  
  <p>Table:</p>
  
  <pre><code>ID       prev_start_date    prev_end_date
  456        2/13/2017          
  </code></pre>