title: Oracle - ORA-01840: input value not long enough for date format
body: <p>I having an <code>query</code> like this </p>
  
  <pre><code>SELECT test_VALUE FROM testTable
  WHERE TO_DATE("test", 'yyyy-mm-dd') &gt;= (TO_DATE('2012-01-01', 'yyyy-mm-dd') + '30'
  </code></pre>
  
  <p>When executing this <code>query</code> I getting the original data. But when I replacing <code>30</code> with another <code>inner select query</code> like this</p>
  
  <pre><code>select test_value from testtable
  where TO_DATE("test", 'yyyy-mm-dd') &gt;= (TO_DATE('2012-01-01', 'yyyy-mm-dd') + 
  (select test_Value1 from testtable where some_condition=1)
  </code></pre>
  
  <p>I getting the error <code>ORA-01840: input value not long enough for date format</code></p>
  
  <p>The inner query <code>select test_Value1 from testtable where some_condition=1</code> alone will output a result <code>30</code></p>