select *
from table1 rcd,
table2 company
WHERE to_timestamp(to_char(rcd.date), 'YYYY-MM-DD HH:MI:SS') >
to_timestamp(to_char(company.date), 'YYYY-MM-DD HH:MI:SS')
I want to compare two of my date fields using the timestamp (to_timestamp) in oracle and I am using above query its not giving correct results (giving records which are not greater than from company.date).
any idea how to compare using the to_timestamp in oracle.
table1totable2, so you'll get a cartesian product. Is this what you meant?>can compare time stamps, but you try to select from cartesian producted result set.rcd.date > company.date?