Skip to content
Advertisement

oracle sql – get difference between 2 dates (sysdate minus the datevalue of a other table)

I want to know the difference betweeen 2 dates.

I need something like this: “sysdate minus the datevalue of a other table”

Currently I have something like this, but it’s not working

The 2nd select statement prints the date of the latest export. Example “27-JUL-21”.

thanks for your help.

Advertisement

Answer

It can not work. Because the result of

is a decimal value. For example 5121.2 days difference between SYSDATE and latestExport and you can not compare your Date value mydate with a decimal. This is the logic you used:

You need to think again about the result you want to get from this query.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement