Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Unable to compare/convert Date and timestamp column

User_6GLH0Mar 14 2021

Hi All,
My below query returns all the results when both the issue_date and effective_date are null but it does not return the records that has date in issue_date and and timestamp in EFFECTIVE_DATE. I'm unable to convert the date to timestamp or timestamp to date in my join below.
I need to see the results when both of these fields are null or both of them has the same date. I'm using Oracle 19C
select * from TABLE-A a
inner join TABLE-B b
on a.issue_date=b.EFFECTIVE_DATE;

TABLE-A:
Column definition: ISSUE_DATE DATE
image.pngTABLE-B:
Column definition: EFFECTIVE_DATE TIMESTAMP(6)
image.png

This post has been answered by Frank Kulash on Mar 14 2021
Jump to Answer
Comments
Post Details
Added on Mar 14 2021
10 comments
3,293 views