title: Oracle - bad date value in DATE column
body: <p>I am faced with strange situation, when Oracle doesn't let me select rows by DATE value, that has in DB.</p>
  <p>There is some table with <code>TRANS_DATE</code> column (DATE data type).</p>
  <p>I am trying to import data from that Oracle to MS Sql Server and import fails with &quot;bad value for DATE column&quot;.</p>
  <p>After some investigation I found, that there is strange value <code>'0002-11-30'</code> in source table.</p>
  <pre><code>SELECT a
  FROM (
  SELECT DISTINCT  trunc(TRANS_DATE) a
  FROM OWS.DOC
  )
  ORDER BY a asc
  </code></pre>
  <p>OK, I tried to select rows from Oracle by that value, but I am getting an error:</p>
  <pre><code>SELECT *
  FROM OWS.DOC
  WHERE TRANS_DATE='0002-11-30 00:00:00'
  </code></pre>
  <p>Error:</p>
  <pre><code>SQL Error [1847] [22008]: ORA-01847: day of month must be between 1 and  last day of month
  </code></pre>
  <p>I already tried this select too:</p>
  <pre><code>SELECT *
  FROM OWS.DOC
  WHERE TRANS_DATE=to_date('0002-11-30', 'yyyy-mon-dd')
  </code></pre>
  <p>It returns me an error</p>
  <pre><code>SQL Error [1843] [22008]: ORA-01843: not a valid month
  </code></pre>
  <p>How should I construct PL-SQL query to select for such data?</p>