title: Literal Does Not Match 01861
body: <pre><code>select case 
           when sale not in  TO_date(sale,'MMYY') then  'N' 
           else sale 
         end  test
    from daily sales
  </code></pre>
  
  <p>I would like to see if the data in the column meets the following criteria using the above select. I am receiving the following error:</p>
  
  <blockquote>
    <p>LITERAL DOES NOT MATCH FORMAT STRING</p>
  </blockquote>
  
  <p>small data set</p>
  
  <pre><code>0109
  0106
  0409
  </code></pre>
  
  <p>column is  a <code>varchar</code></p>