title: Expected TIMESTAMP got NUMBER error
body: <p>I have two columns, one is NUMBER_COLUMN(with number datatype) and the other is a TIMESTAMP_COLUMN(with timestamp datatype) in different tables.
  I need to convert the number_column values into TIMESTAMP data format so I can validate their values. I got a working code for the conversion--see below.</p>
  
  <pre><code>CAST(LAST_DAY(to_timestamp(lpad(cast(NUMBER_COLUMN as varchar2(6)), 6, '0'), 'MMYYYY')) AS TIMESTAMP)
  </code></pre>
  
  <p>I use the above query in a select statement to convert the NUMBER_column data value into the format that corresponds with my timestamp_column data format.
  Then I have a NOT EXISTS block that is basically another select statement that ends with 
  where NUMBER_COLUMN=TIMESTAMP_COLUMN. But this last condition gives me an error "TIMESTAMP GOT NUMBER". See below for the script.</p>
  
  <pre><code>SELECT CAST(LAST_DAY(to_timestamp(lpad(cast(NUMBER_COLUMN as varchar2(6)), 6, '0'), 'MMYYYY')) AS TIMESTAMP) AS NUMBER_COLUMN FROM TAB1 T1
  WHERE NOT EXISTS(SELECT P.TIMESTAMP_COLUMN FROM 
                   (SELECT TIMESTAMP_COLUMN FROM TAB2)
                   WHERE P.TIMESTAMP=T1.NUMBER_COLUMN);
  </code></pre>