title: Replace date error in oracle sql case statement
body: <p>I have a table that contains a date error.</p>
  
  <p>The error is a typo that looks like this : 01-AUG-208 instead of 01-AUG-2008. 
  What I am trying to do is create a view from that table with the correct info.</p>
  
  <p>I have tried this but it gives me an ORA-01858: a non-numeric character found where a digit was expected</p>
  
  <pre><code>CREATE OR REPLACE VIEW IC_STRUCTURE("DATE_DE_CONSTRUCTION") AS
  SELECT 
    CASE
      WHEN DATE_DE_CONSTRUCTION = '01-AUG-208'
      THEN TO_DATE('01-AUG-2008')
      ELSE DATE_DE_CONSTRUCTION
    END AS DATE_DE_CONSTRUCTION
  FROM structure_souterraine;
  </code></pre>
  
  <p>Unfortunatly i cannot simply update the error by the correct value because that table is updated every month by another database which is the source of the error. I would have to correct it every month.</p>
  
  <p>What is wrong with my query?
  Is there another work around ?</p>