title: NVL in BETWEEN date AND
body: <p>Ok have a lot of records and mayebe one order number = 11233.</p>
  
  <p>part of code which is not correct</p>
  
  <pre><code> AND a.C_DATE BETWEEN TO_DATE (
                                     NVL ('&amp;C_DATE_FROM', '1900-01-01'),
                                     'yyyy-mm-dd')
                              AND TO_DATE (
                                     NVL ('&amp;C_DATE_TO', '2099-12-31'),
                                     'yyyy-mm-dd')
  </code></pre>
  
  <p>My question How Can I write a condition if a.C_DATE is null ???
  Now I dont have a record when a.C_DATe is null </p>
  
  <p>I wrote sth like this</p>
  
  <pre><code> AND (a.C_DATE BETWEEN TO_DATE (
                                     NVL ('&amp;C_DATE_FROM', '1900-01-01'),
                                     'yyyy-mm-dd')
                              AND TO_DATE (
                                     NVL ('&amp;C_DATE_TO', '2099-12-31'),
                                     'yyyy-mm-dd') OR a.C_DATE IS NULL)
  </code></pre>
  
  <p>but I'm waiting for a long time....</p>